open-nomad/ui/.eslintrc.js
Buck Doyle 222b36ced3
UI: use lazy-loading for Xterm.js (#7964)
This updates Xterm.js to 4.6.0, which includes support for reverse-wraparound
mode, so we no longer need to use a vendored dependency, which closes #7461.
The interface for accessing the buffer that’s used for test assertions changed.

With the dependency now accessed conventionally, we can have it load only when
it’s needed by an exec popup window, which closes #7516. That saves us
≈60kb compressed in the dependency bundle!
2020-05-26 09:56:25 -05:00

72 lines
1.5 KiB
JavaScript

module.exports = {
root: true,
globals: {
server: true,
},
env: {
browser: true,
es6: true,
},
extends: 'eslint:recommended',
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
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,
},
],
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'server/**/*.js',
'lib/*/index.js',
],
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'
}),
},
{
files: [
'stories/**/*.js'
],
parserOptions: {
sourceType: 'module',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
},
],
};