Skip to content

Commit

Permalink
test: set up basic testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Jan 13, 2020
1 parent f23bbcc commit 1f2400b
Show file tree
Hide file tree
Showing 4 changed files with 7,415 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: [require.resolve('./index.js')]
}
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
module.exports = {
extends: [
require.resolve('eslint-config-airbnb-base')
require.resolve('eslint-config-airbnb-base'),
],
settings: {
'import/resolver': {
// https://github.com/benmosher/eslint-plugin-import/issues/1396
[require.resolve('eslint-import-resolver-node')]: {},
[require.resolve('eslint-import-resolver-webpack')]: {
config: require.resolve('@vue/cli-service/webpack.config.js')
}
config: require.resolve('@vue/cli-service/webpack.config.js'),
},
},
'import/extensions': [
'.js',
'.jsx',
'.mjs',
'.ts',
'.tsx'
]
'.tsx',
],
},
rules: {
'import/extensions': ['error', 'always', {
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never'
tsx: 'never',
}],
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}]
}
}
'e', // for e.returnvalue
],
}],
},
};
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "https://github.com/vuejs/eslint-config-airbnb/issues"
},
"homepage": "https://github.com/vuejs/eslint-config-airbnb#readme",
"scripts": {
"test": "eslint . --no-fix"
},
"dependencies": {
"eslint-config-airbnb-base": "^14.0.0",
"eslint-import-resolver-node": "^0.3.3",
Expand All @@ -30,5 +33,9 @@
"@vue/cli-service": "^3.0.0 || ^4.0.0-0",
"eslint": "^5.16.0 || ^6.1.0",
"eslint-plugin-import": "^2.18.2"
},
"devDependencies": {
"@vue/cli-service": "^4.1.2",
"eslint": "^6.8.0"
}
}
Loading

0 comments on commit 1f2400b

Please sign in to comment.