forked from luketheobscure/percy-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (59 loc) · 1.49 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
env: {
browser: true,
es6: true,
},
plugins: ['prettier'],
extends: ['prettier', 'eslint:recommended', 'plugin:ember/recommended'],
parser: "babel-eslint",
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
printWidth: 100,
},
],
'brace-style': ['error', '1tbs', {allowSingleLine: false}],
'max-len': ['error', 100],
'no-unused-expressions': 'error',
'object-curly-spacing': ['error', 'never'],
quotes: ['error', 'single', {avoidEscape: true}],
'keyword-spacing': ['error', {before: true}],
'space-in-parens': ['error', 'never'],
semi: ['error', 'always'],
'space-unary-ops': ['error', {nonwords: false}],
'comma-dangle': ['error', 'always-multiline'],
'no-unused-expressions': ["error", { "allowTernary": true }],
},
overrides: [
{
// chai uses some expressions like `to.be.ok` which are valid syntax
// but get caught by this rule.
files: '*-test.js',
rules: {
"no-unused-expressions": 'off'
}
}, {
files: ['mirage/**'],
}, {
// node files
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'tailwind.config.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js',
],
}
],
};