|
2 | 2 |
|
3 | 3 | module.exports = { |
4 | 4 | root: true, |
5 | | - parser: 'babel-eslint', |
| 5 | + parser: '@typescript-eslint/parser', |
6 | 6 | parserOptions: { |
7 | 7 | ecmaVersion: 2018, |
8 | | - sourceType: 'module' |
| 8 | + sourceType: 'module', |
9 | 9 | }, |
10 | | - plugins: ['prettier'], |
11 | | - extends: ['eslint:recommended', 'prettier'], |
| 10 | + plugins: ['ember', '@typescript-eslint', 'prettier'], |
| 11 | + extends: [ |
| 12 | + 'eslint:recommended', |
| 13 | + 'plugin:ember/recommended', |
| 14 | + 'plugin:@typescript-eslint/recommended', |
| 15 | + 'plugin:prettier/recommended', |
| 16 | + ], |
12 | 17 | env: { |
13 | | - es6: true |
| 18 | + browser: true, |
14 | 19 | }, |
15 | | - |
16 | 20 | rules: { |
17 | | - 'prettier/prettier': 'error' |
| 21 | + '@typescript-eslint/no-explicit-any': 'off', |
| 22 | + '@typescript-eslint/no-empty-function': 'off', |
18 | 23 | }, |
19 | 24 |
|
20 | 25 | overrides: [ |
21 | 26 | // node files |
22 | 27 | { |
23 | 28 | files: [ |
24 | | - '.eslintrc.js', |
25 | | - '.prettierrc.js', |
26 | | - '.template-lintrc.js', |
27 | | - 'ember-cli-build.js', |
28 | | - 'index.js', |
29 | | - 'testem.js', |
30 | | - 'blueprints/*/index.js', |
31 | | - 'config/**/*.js', |
32 | | - 'tests/dummy/config/**/*.js', |
33 | | - 'lib/**/*.js' |
34 | | - ], |
35 | | - excludedFiles: [ |
36 | | - 'addon/**', |
37 | | - 'addon-test-support/**', |
38 | | - 'app/**', |
39 | | - 'tests/dummy/app/**', |
40 | | - 'vendor/**' |
| 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', |
| 38 | + './lib/*.js', |
41 | 39 | ], |
42 | 40 | parserOptions: { |
43 | | - sourceType: 'script' |
| 41 | + sourceType: 'script', |
44 | 42 | }, |
45 | 43 | env: { |
46 | 44 | browser: false, |
47 | | - node: true |
| 45 | + node: true, |
48 | 46 | }, |
49 | 47 | plugins: ['node'], |
50 | | - extends: ['plugin:node/recommended'] |
| 48 | + extends: ['plugin:node/recommended'], |
| 49 | + rules: { |
| 50 | + '@typescript-eslint/no-var-requires': 'off', |
| 51 | + }, |
51 | 52 | }, |
52 | | - |
53 | 53 | { |
54 | | - files: ['vendor/**/*.js'], |
55 | | - |
56 | | - env: { |
57 | | - browser: true |
58 | | - }, |
59 | | - |
60 | | - rules: { |
61 | | - 'no-inner-declarations': 'off' |
62 | | - } |
63 | | - } |
64 | | - ] |
| 54 | + // test files |
| 55 | + files: ['tests/**/*-test.{js,ts}'], |
| 56 | + extends: ['plugin:qunit/recommended'], |
| 57 | + }, |
| 58 | + ], |
65 | 59 | }; |
0 commit comments