Skip to content

Commit

Permalink
Configure PR check (moroshko#730)
Browse files Browse the repository at this point in the history
* add lint to github action

* simplify pr check action
  • Loading branch information
aberezkin authored Mar 30, 2020
1 parent e8fb2b5 commit bbd1c3c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
25 changes: 15 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
es6: true,
node: true,
browser: true,
mocha: true
mocha: true,
},
parser: 'babel-eslint',
plugins: ['react'],
Expand All @@ -20,23 +20,23 @@ module.exports = {
{
object: 'describe',
property: 'only',
message: 'Please run all tests!'
message: 'Please run all tests!',
},
{
object: 'describe',
property: 'skip',
message: 'Please run all tests!'
message: 'Please run all tests!',
},
{
object: 'it',
property: 'only',
message: 'Please run all tests!'
message: 'Please run all tests!',
},
{
object: 'it',
property: 'skip',
message: 'Please run all tests!'
}
message: 'Please run all tests!',
},
],
'no-template-curly-in-string': 2,
'no-unused-vars': 2,
Expand All @@ -46,8 +46,8 @@ module.exports = {
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var']
}
next: ['const', 'let', 'var'],
},
],
'prefer-destructuring': [2, { array: false, object: true }],
'prefer-rest-params': 2,
Expand Down Expand Up @@ -93,6 +93,11 @@ module.exports = {
'react/jsx-pascal-case': 2,
'react/jsx-sort-props': 0,
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2
}
'react/jsx-uses-vars': 2,
},
settings: {
react: {
version: 'detect',
},
},
};
8 changes: 3 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: PR status checks

on:
push:
Expand All @@ -16,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [12.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -25,6 +22,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm test
env:
CI: true

0 comments on commit bbd1c3c

Please sign in to comment.