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