Skip to content

Commit

Permalink
fix eslint config (ant-design#11701)
Browse files Browse the repository at this point in the history
* fix eslint config

* use same pattern
  • Loading branch information
NE-SmallTown authored and afc163 committed Aug 10, 2018
1 parent a14e476 commit debee2e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ components/*/__tests__/type.tsx
!.eslintrc.js
!components/*/__tests__/**/*.js
!components/*/demo/*
!.*.js
5 changes: 2 additions & 3 deletions .jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ const libDir = process.env.LIB_DIR;

const transformIgnorePatterns = [
'/dist/',
'node_modules\/[^/]+?\/(?!(es|node_modules)\/)', // Ignore modules without es dir
'node_modules/[^/]+?/(?!(es|node_modules)/)', // Ignore modules without es dir
];

module.exports = {
verbose: true,
testURL: "http://localhost/",
setupFiles: [
'./tests/setup.js',
],
Expand Down Expand Up @@ -48,7 +47,7 @@ module.exports = {
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.test.json',
}
},
},
testURL: 'http://localhost',
};
4 changes: 2 additions & 2 deletions .jest.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ module.exports = {
testRegex: 'demo\\.test\\.js$',
testEnvironment: 'node',
snapshotSerializers: [
'enzyme-to-json/serializer'
'enzyme-to-json/serializer',
],
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.test.json',
}
},
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"test-all": "./scripts/test-all.sh",
"lint": "npm run lint:ts && npm run lint:es && npm run lint:demo && npm run lint:style",
"lint:ts": "npm run tsc && antd-tools run ts-lint",
"lint:es": "eslint tests site scripts components ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx'",
"lint:es": "eslint tests site scripts components ./.*.js ./webpack.config.js --ext '.js,.jsx'",
"lint:demo": "cross-env RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'",
"lint:style": "stylelint \"{site,components}/**/*.less\" --syntax less",
"lint-fix:ts": "npm run tsc && antd-tools run ts-lint-fix",
Expand Down

0 comments on commit debee2e

Please sign in to comment.