conf(wai): eslint
parent
086683f782
commit
3158595b30
@ -1,18 +1,29 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
node: true,
|
||||||
commonjs: true,
|
es2021: true,
|
||||||
es6: true,
|
|
||||||
'jest/globals': true,
|
|
||||||
},
|
},
|
||||||
extends: ['standard', 'plugin:prettier/recommended'],
|
extends: ['standard', 'prettier', 'plugin:prettier/recommended'],
|
||||||
plugins: ['prettier', 'jest'],
|
plugins: ['n', 'prettier'],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 2019,
|
ecmaVersion: 'latest',
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
// Add here all the extra rules based on the developer preferences
|
'prettier/prettier': ['warn', { parser: 'flow' }],
|
||||||
'no-unused-vars': ['warn', { args: 'after-used', vars: 'all' }],
|
'n/exports-style': ['warn', 'module.exports'],
|
||||||
|
'n/file-extension-in-import': ['error', 'always'],
|
||||||
|
'n/prefer-promises/dns': 'error',
|
||||||
|
'n/prefer-promises/fs': 'error',
|
||||||
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
||||||
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||||
},
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['test/**/*.js'],
|
||||||
|
env: {
|
||||||
|
mocha: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue