Skip to content

Commit

Permalink
test: fix lint, close #2295
Browse files Browse the repository at this point in the history
  • Loading branch information
warmhug committed May 14, 2018
1 parent 5a2d0d5 commit f11ead0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .eslintignore
@@ -1 +1,6 @@
node_modules/
components/**/*.js
components/**/*.jsx
components/*/__tests__/type.tsx
!.eslintrc.js
!components/*/__tests__/**/*.js
!components/*/demo/*
10 changes: 4 additions & 6 deletions .eslintrc.js
@@ -1,5 +1,3 @@
'use strict';

const eslintrc = {
extends: ['eslint-config-airbnb'],
env: {
Expand All @@ -21,7 +19,7 @@ const eslintrc = {
'markdown',
'react',
'babel',
'jsx-a11y'
'jsx-a11y',
],
rules: {
'class-methods-use-this': 0,
Expand All @@ -39,7 +37,7 @@ const eslintrc = {
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'react/no-string-refs': 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx", ".md"] }],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.tsx', '.md'] }],
'react/no-array-index-key': 0,
'react/no-find-dom-node': 0,
'react/require-extension': 0,
Expand All @@ -51,7 +49,7 @@ const eslintrc = {
'jsx-a11y/anchor-is-valid': 0,
'react/jsx-no-comment-textnodes': 0,
'object-curly-newline': 0,
}
},
};

if (process.env.RUN_ENV === 'DEMO') {
Expand All @@ -62,7 +60,7 @@ if (process.env.RUN_ENV === 'DEMO') {
AlipayJSBridge: true,
$: true,
dd: true,
process: true
process: true,
};

Object.assign(eslintrc.rules, {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -100,7 +100,7 @@
"jest": "^21.0.0",
"jsonml.js": "^0.1.0",
"lesshint": "^4.0.2",
"lint-staged": "^4.0.2",
"lint-staged": "^7.0.0",
"lodash.debounce": "^4.0.6",
"mockdate": "^2.0.1",
"pre-commit": "1.x",
Expand Down Expand Up @@ -178,7 +178,7 @@
"{tests,site,scripts,components}/**/*.{js,jsx}": [
"lint-staged:es"
],
"{site,components}/**/*.less": "stylelint",
"{site,components}/**/*.less": "stylelint --syntax less",
"components/*/demo/*.md": [
"lint-staged:demo"
]
Expand Down

0 comments on commit f11ead0

Please sign in to comment.