|
2 | 2 |
|
3 | 3 | module.exports = {
|
4 | 4 | root: true,
|
5 |
| - parser: 'babel-eslint', |
| 5 | + parser: '@babel/eslint-parser', |
6 | 6 | parserOptions: {
|
7 |
| - ecmaVersion: 2018, |
| 7 | + ecmaVersion: 'latest', |
8 | 8 | sourceType: 'module',
|
9 |
| - ecmaFeatures: { |
10 |
| - legacyDecorators: true |
11 |
| - } |
| 9 | + requireConfigFile: false, |
| 10 | + babelOptions: { |
| 11 | + plugins: [ |
| 12 | + ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], |
| 13 | + ], |
| 14 | + }, |
12 | 15 | },
|
13 |
| - plugins: [ |
14 |
| - 'ember' |
15 |
| - ], |
| 16 | + plugins: ['ember'], |
16 | 17 | extends: [
|
17 | 18 | 'eslint:recommended',
|
18 |
| - 'plugin:ember/recommended' |
| 19 | + 'plugin:ember/recommended', |
| 20 | + 'plugin:prettier/recommended', |
19 | 21 | ],
|
20 | 22 | env: {
|
21 |
| - browser: true |
22 |
| - }, |
23 |
| - rules: { |
24 |
| - 'ember/no-jquery': 'error' |
| 23 | + browser: true, |
25 | 24 | },
|
| 25 | + rules: {}, |
26 | 26 | overrides: [
|
27 | 27 | // node files
|
28 | 28 | {
|
29 | 29 | files: [
|
30 |
| - '.eslintrc.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' |
38 |
| - ], |
39 |
| - excludedFiles: [ |
40 |
| - 'addon/**', |
41 |
| - 'addon-test-support/**', |
42 |
| - 'app/**', |
43 |
| - 'tests/dummy/app/**' |
| 30 | + './.eslintrc.js', |
| 31 | + './.prettierrc.js', |
| 32 | + './.stylelintrc.js', |
| 33 | + './.template-lintrc.js', |
| 34 | + './ember-cli-build.js', |
| 35 | + './index.js', |
| 36 | + './testem.js', |
| 37 | + './blueprints/*/index.js', |
| 38 | + './config/**/*.js', |
| 39 | + './tests/dummy/config/**/*.js', |
44 | 40 | ],
|
45 | 41 | parserOptions: {
|
46 |
| - sourceType: 'script' |
| 42 | + sourceType: 'script', |
47 | 43 | },
|
48 | 44 | env: {
|
49 | 45 | browser: false,
|
50 |
| - node: true |
| 46 | + node: true, |
51 | 47 | },
|
52 |
| - plugins: ['node'], |
53 |
| - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { |
54 |
| - // add your custom rules and overrides for node files here |
55 |
| - }) |
56 |
| - } |
57 |
| - ] |
| 48 | + extends: ['plugin:n/recommended'], |
| 49 | + }, |
| 50 | + { |
| 51 | + // test files |
| 52 | + files: ['tests/**/*-test.{js,ts}'], |
| 53 | + extends: ['plugin:qunit/recommended'], |
| 54 | + }, |
| 55 | + ], |
58 | 56 | };
|
0 commit comments