Nuxt/.eslintrc.js

62 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-11-07 01:34:58 +00:00
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
2018-03-18 07:56:41 +00:00
node: true,
'jest/globals': true
2016-11-07 01:34:58 +00:00
},
2018-03-16 19:52:03 +00:00
extends: [
'standard',
'standard-jsx',
'plugin:import/errors',
'plugin:import/warnings'
],
2016-11-07 01:34:58 +00:00
plugins: [
2018-03-18 07:56:41 +00:00
'html',
'jest'
2016-11-07 01:34:58 +00:00
],
2018-03-16 19:52:03 +00:00
settings: {
'import/resolver': {
node: { extensions: ['.js', '.mjs'] }
}
},
2016-11-07 01:34:58 +00:00
rules: {
2018-03-16 19:52:03 +00:00
// Enforce import order
'import/order': 2,
// Imports should come first
'import/first': 2,
// Other import rules
"import/no-mutable-exports": 2,
// Allow unresolved imports
'import/no-unresolved': 0,
// Allow paren-less arrow functions
2016-11-07 01:34:58 +00:00
'arrow-parens': 0,
2018-03-16 19:52:03 +00:00
// Allow async-await
2016-11-07 01:34:58 +00:00
'generator-star-spacing': 0,
2018-03-16 19:52:03 +00:00
// Allow debugger during development
2016-12-08 15:41:20 +00:00
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
2018-03-16 19:52:03 +00:00
// Do not allow console.logs etc...
'no-console': 2,
'space-before-function-paren': [
2,
{
anonymous: 'always',
named: 'never'
}
],
2016-11-07 01:34:58 +00:00
},
2018-03-16 19:52:03 +00:00
2016-11-07 01:34:58 +00:00
globals: {}
}