Skip to content

Commit

Permalink
update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shrpne committed Nov 30, 2020
1 parent c8371b1 commit 710d313
Show file tree
Hide file tree
Showing 7 changed files with 461 additions and 24 deletions.
50 changes: 41 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ module.exports = {
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: 'airbnb-base',
// required to lint *.vue files
// plugins: [
// 'html'
// ],
// // add your custom rules here
plugins: [
'jest',
'security',
'unicorn',
],
// add your custom rules here
rules: {
'indent': ["error", 4],
// allow paren-less arrow functions
Expand All @@ -41,11 +42,42 @@ module.exports = {
},
overrides: [
{
files: ['examples/*'],
files: ['src/**/*'],
extends: [
'plugin:security/recommended',
'plugin:unicorn/recommended',
],
rules: {
"import/no-extraneous-dependencies": 0,
'no-console': 0,
'security/detect-object-injection': 0,
'unicorn/better-regex': 0,
// full path import is per spec
'unicorn/import-index': 0,
// IE11 support needed
'unicorn/prefer-includes': 0,
'unicorn/prefer-ternary': 0,
// allow lowercase hex number
'unicorn/number-literal-case': 0,
'unicorn/prefer-optional-catch-binding': 0,
'unicorn/prevent-abbreviations': ['error', {
replacements: {
'num': false,
'str': false,
},
// whitelist: {
// 'prettyNum': true,
// }
}],
},
},
{
files: ['test/**/*'],
extends: [
'plugin:jest/recommended',
],
rules: {
'no-unused-vars': 0,
'import/extensions': 0,
}
}
},
]
};
Loading

0 comments on commit 710d313

Please sign in to comment.