Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lint-staged #107

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/fixtures/*.js
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.eslintignore
.eslintrc.js
.travis.yml
/test
15 changes: 4 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,9 @@
"lint-staged"
],
"lint-staged": {
"ignore": [
"test/fixtures/*.js"
],
"linters": {
"**/*.js": "eslint",
"package.json": [
"sort-package-json",
"git add"
]
}
"(src|test)/**/*.js": "jest --findRelatedTests",
"**/*.js": "eslint",
"package.json": "sort-package-json"
},
"jest": {
"testRegex": "test/index.js"
Expand All @@ -61,7 +54,7 @@
"devDependencies": {
"eslint": "6.8.0",
"jest": "^28.1.3",
"lint-staged": "^8.1.5",
"lint-staged": "^13.0.3",
"pre-commit": "^1.2.2",
"sort-package-json": "^1.22.1"
},
Expand Down
5 changes: 4 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const path = require('path');
*/

describe('eslint-config-seegno', () => {
const linter = new CLIEngine({ configFile: path.join(__dirname, '..', 'src', 'index.js') });
const linter = new CLIEngine({
configFile: path.join(__dirname, '..', 'src', 'index.js'),
ignore: false
});

it('should not generate any violation for correct code', () => {
const source = path.join(__dirname, 'fixtures', 'correct.js');
Expand Down
Loading