open-nomad/ui/.eslintrc.js

58 lines
1.3 KiB
JavaScript
Raw Normal View History

2017-09-19 14:47:10 +00:00
module.exports = {
root: true,
2017-09-19 14:47:10 +00:00
globals: {
server: true,
},
env: {
browser: true,
es6: true,
},
extends: 'eslint:recommended',
parserOptions: {
2019-04-02 22:59:16 +00:00
ecmaVersion: 2018,
2017-09-19 14:47:10 +00:00
sourceType: 'module',
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single', 'avoid-escape'],
semi: ['error', 'always'],
'no-constant-condition': [
'error',
{
checkLoops: false,
},
],
2017-09-19 14:47:10 +00:00
},
2019-03-12 23:42:47 +00:00
overrides: [
// node files
{
files: [
'.eslintrc.js',
2019-03-15 20:26:18 +00:00
'.template-lintrc.js',
2019-03-12 23:42:47 +00:00
'ember-cli-build.js',
'testem.js',
2019-03-15 20:26:18 +00:00
'blueprints/*/index.js',
2019-03-12 23:42:47 +00:00
'config/**/*.js',
2019-10-08 18:44:19 +00:00
'server/**/*.js',
'lib/*/index.js',
2019-03-12 23:42:47 +00:00
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
}),
},
],
2017-09-19 14:47:10 +00:00
};