|
2 | 2 |
|
3 | 3 | module.exports = {
|
4 | 4 | root: true,
|
| 5 | + parser: 'babel-eslint', |
5 | 6 | parserOptions: {
|
6 |
| - ecmaVersion: 2017, |
7 |
| - sourceType: 'module' |
| 7 | + ecmaVersion: 2018, |
| 8 | + sourceType: 'module', |
| 9 | + ecmaFeatures: { |
| 10 | + legacyDecorators: true, |
| 11 | + }, |
8 | 12 | },
|
9 |
| - plugins: ['ember', 'prettier'], |
10 |
| - extends: ['eslint:recommended', 'plugin:ember/recommended', 'prettier'], |
| 13 | + plugins: ['ember'], |
| 14 | + extends: [ |
| 15 | + 'eslint:recommended', |
| 16 | + 'plugin:ember/recommended', |
| 17 | + 'plugin:prettier/recommended', |
| 18 | + ], |
11 | 19 | env: {
|
12 |
| - browser: true |
13 |
| - }, |
14 |
| - rules: { |
15 |
| - 'ember/avoid-leaking-state-in-ember-objects': 0, |
16 |
| - 'prettier/prettier': ['error', { singleQuote: true }] |
| 20 | + browser: true, |
17 | 21 | },
|
| 22 | + rules: {}, |
18 | 23 | overrides: [
|
19 | 24 | // node files
|
20 | 25 | {
|
21 | 26 | files: [
|
22 |
| - '.eslintrc.js', |
23 |
| - '.prettierrc.js', |
24 |
| - '.template-lintrc.js', |
25 |
| - 'ember-cli-build.js', |
26 |
| - 'index.js', |
27 |
| - 'testem.js', |
28 |
| - 'blueprints/*/index.js', |
29 |
| - 'config/**/*.js', |
30 |
| - 'tests/dummy/config/**/*.js' |
31 |
| - ], |
32 |
| - excludedFiles: [ |
33 |
| - 'addon/**', |
34 |
| - 'addon-test-support/**', |
35 |
| - 'app/**', |
36 |
| - 'tests/dummy/app/**' |
| 27 | + './.eslintrc.js', |
| 28 | + './.prettierrc.js', |
| 29 | + './.template-lintrc.js', |
| 30 | + './ember-cli-build.js', |
| 31 | + './index.js', |
| 32 | + './testem.js', |
| 33 | + './blueprints/*/index.js', |
| 34 | + './config/**/*.js', |
| 35 | + './tests/dummy/config/**/*.js', |
37 | 36 | ],
|
38 | 37 | parserOptions: {
|
39 | 38 | sourceType: 'script',
|
40 |
| - ecmaVersion: 2015 |
41 | 39 | },
|
42 | 40 | env: {
|
43 | 41 | browser: false,
|
44 |
| - node: true |
| 42 | + node: true, |
45 | 43 | },
|
46 | 44 | plugins: ['node'],
|
47 |
| - rules: Object.assign( |
48 |
| - {}, |
49 |
| - require('eslint-plugin-node').configs.recommended.rules, |
50 |
| - { |
51 |
| - // add your custom rules and overrides for node files here |
52 |
| - } |
53 |
| - ) |
| 45 | + extends: ['plugin:node/recommended'], |
54 | 46 | },
|
55 | 47 | {
|
56 |
| - files: ['tests/unit/**/*.js'], |
57 |
| - env: { |
58 |
| - browser: false, |
59 |
| - node: true, |
60 |
| - mocha: true |
61 |
| - }, |
62 |
| - plugins: ['node'], |
63 |
| - rules: Object.assign( |
64 |
| - {}, |
65 |
| - require('eslint-plugin-node').configs.recommended.rules, |
66 |
| - { |
67 |
| - // add your custom rules and overrides for node files here |
68 |
| - } |
69 |
| - ) |
70 |
| - } |
71 |
| - ] |
| 48 | + // Test files: |
| 49 | + files: ['tests/**/*-test.{js,ts}'], |
| 50 | + // extends: ['plugin:qunit/recommended'], |
| 51 | + }, |
| 52 | + ], |
72 | 53 | };
|
0 commit comments