|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | 3 | module.exports = { |
4 | | - root: true, |
5 | | - parser: 'babel-eslint', |
| 4 | + root: true, |
| 5 | + parser: 'babel-eslint', |
6 | 6 | parserOptions: { |
7 | | - ecmaVersion: 2018, |
8 | | - sourceType: 'module', |
| 7 | + ecmaVersion: 2018, |
| 8 | + sourceType: 'module', |
9 | 9 | ecmaFeatures: { |
10 | | - legacyDecorators: true |
11 | | - } |
| 10 | + legacyDecorators: true, |
| 11 | + }, |
12 | 12 | }, |
13 | | - globals: { |
14 | | - server: true, |
15 | | - lottie: true, |
16 | | - ActionCable: true |
17 | | - }, |
18 | | - extends: ['eslint:recommended', 'plugin:ember-suave/recommended'], |
19 | | - env: { |
| 13 | + extends: [ |
| 14 | + 'eslint:recommended', |
| 15 | + 'plugin:ember/recommended', |
| 16 | + 'plugin:prettier/recommended', |
| 17 | + ], |
| 18 | + env: { |
20 | 19 | embertest: true, |
21 | | - browser: true, |
22 | | - es6: true |
23 | | - }, |
24 | | - plugins: ['align-assignments', 'arca', 'ember'], |
25 | | - rules: { |
26 | | - 'align-assignments/align-assignments': ['warn', { requiresOnly: false }], |
27 | | - 'arca/import-align': 'error', |
28 | | - 'arca/newline-after-import-section': 'error', |
29 | | - 'arca/melted-constructs': 'error', |
30 | | - 'arca/import-ordering': 'error', |
31 | | - 'array-bracket-spacing': 'off', |
32 | | - camelcase: ['error'], |
33 | | - 'ember/no-jquery': 'warn', |
34 | | - 'ember/use-ember-data-rfc-395-imports': ['error'], |
35 | | - 'ember/new-module-imports': ['error'], |
36 | | - 'ember/no-function-prototype-extensions': ['error'], |
37 | | - 'ember/no-old-shims': ['error'], |
38 | | - 'ember/no-unnecessary-route-path-option': ['error'], |
39 | | - 'ember/no-unnecessary-service-injection-argument': ['error'], |
40 | | - 'ember/require-computed-macros': ['error'], |
41 | | - |
42 | | - 'ember/avoid-leaking-state-in-ember-objects': ['warn'], |
43 | | - 'ember/computed-property-getters': ['error'], |
44 | | - |
45 | | - 'ember/jquery-ember-run': ['error'], |
46 | | - 'ember/no-arrow-function-computed-properties': ['error'], |
47 | | - 'ember/no-capital-letters-in-routes': ['error'], |
48 | | - 'ember/no-deeply-nested-dependent-keys-with-each': ['error'], |
49 | | - 'ember/no-duplicate-dependent-keys': ['error'], |
50 | | - 'ember/no-ember-super-in-es-classes': ['error'], |
51 | | - 'ember/no-ember-testing-in-module-scope': ['error'], |
52 | | - 'ember/no-incorrect-calls-with-inline-anonymous-functions': ['error'], |
53 | | - 'ember/no-invalid-debug-function-arguments': ['error'], |
54 | | - 'ember/no-side-effects': ['warn'], |
55 | | - 'ember/require-super-in-init': ['error'], |
56 | | - 'ember/require-computed-property-dependencies': ['error'], |
57 | | - 'ember/use-brace-expansion': ['warn'], |
58 | | - |
59 | | - 'object-curly-spacing': ['error', 'always'], |
60 | | - |
61 | | - 'no-console': ['error', { allow: ['error'] }], |
62 | | - quotes: ['error', 'single', { allowTemplateLiterals: true }], |
63 | | - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], |
64 | | - indent: [ |
65 | | - 'error', |
66 | | - 2, |
67 | | - { |
68 | | - FunctionExpression: { body: 1, parameters: 'first' }, |
69 | | - FunctionDeclaration: { body: 1, parameters: 'first' }, |
70 | | - CallExpression: { arguments: 'off' }, |
71 | | - MemberExpression: 'off', |
72 | | - ObjectExpression: 'off', |
73 | | - ImportDeclaration: 'first', |
74 | | - ArrayExpression: 'first', |
75 | | - ignoredNodes: ['ConditionalExpression'] |
76 | | - } |
77 | | - ], |
78 | | - 'key-spacing': [ |
79 | | - 'error', |
80 | | - { |
81 | | - multiLine: { beforeColon: false }, |
82 | | - align: { beforeColon: false, on: 'value' } |
83 | | - } |
84 | | - ], |
85 | | - 'max-len': ['error', { code: 90, ignorePattern: '^\\s*(import|test)' }], |
86 | | - |
87 | | - // 'multiline-ternary': ['error', 'never'], |
88 | | - 'max-statements-per-line': 'off', |
89 | | - 'new-cap': 'off', |
90 | | - 'operator-linebreak': 'off' |
| 20 | + browser: true, |
| 21 | + es6: true, |
91 | 22 | }, |
| 23 | + plugins: ['ember'], |
| 24 | + rules: {}, |
92 | 25 | overrides: [ |
93 | 26 | // node files |
94 | 27 | { |
95 | 28 | files: [ |
96 | | - '.eslintrc.js', |
97 | | - '.template-lintrc.js', |
98 | | - 'ember-cli-build.js', |
99 | | - 'testem.js', |
100 | | - 'blueprints/*/index.js', |
101 | | - 'config/**/*.js', |
102 | | - 'lib/*/index.js', |
103 | | - 'server/**/*.js' |
| 29 | + './.eslintrc.js', |
| 30 | + './.prettierrc.js', |
| 31 | + './.template-lintrc.js', |
| 32 | + './ember-cli-build.js', |
| 33 | + './index.js', |
| 34 | + './testem.js', |
| 35 | + './blueprints/*/index.js', |
| 36 | + './config/**/*.js', |
| 37 | + './tests/dummy/config/**/*.js', |
104 | 38 | ], |
105 | 39 | parserOptions: { |
106 | | - sourceType: 'script' |
| 40 | + sourceType: 'script', |
107 | 41 | }, |
108 | 42 | env: { |
109 | 43 | browser: false, |
110 | | - node: true |
| 44 | + node: true, |
111 | 45 | }, |
112 | 46 | plugins: ['node'], |
113 | | - rules: Object.assign( |
114 | | - {}, |
115 | | - require('eslint-plugin-node').configs.recommended.rules, |
116 | | - { |
117 | | - // add your custom rules and overrides for node files here |
118 | | - |
119 | | - // this can be removed once the following is fixed |
120 | | - // https://github.com/mysticatea/eslint-plugin-node/issues/77 |
121 | | - 'node/no-unpublished-require': 'off' |
122 | | - } |
123 | | - ) |
124 | | - } |
125 | | - ] |
| 47 | + extends: ['plugin:node/recommended'], |
| 48 | + }, |
| 49 | + { |
| 50 | + // Test files: |
| 51 | + files: ['tests/**/*-test.{js,ts}'], |
| 52 | + extends: ['plugin:qunit/recommended'], |
| 53 | + }, |
| 54 | + ], |
126 | 55 | }; |
0 commit comments