1+ 'use strict' ;
2+
13module . exports = {
24 root : true ,
3- parser : 'babel- eslint' ,
5+ parser : '@ babel/ eslint-parser ' ,
46 parserOptions : {
5- ecmaVersion : 2018 ,
6- sourceType : 'module'
7+ ecmaVersion : 'latest' ,
8+ sourceType : 'module' ,
9+ requireConfigFile : false ,
10+ babelOptions : {
11+ plugins : [
12+ [ '@babel/plugin-proposal-decorators' , { decoratorsBeforeExport : true } ] ,
13+ ] ,
14+ } ,
715 } ,
816 plugins : [ 'ember' ] ,
9- extends : [ 'eslint:recommended' , 'plugin:ember/recommended' ] ,
17+ extends : [
18+ 'eslint:recommended' ,
19+ 'plugin:ember/recommended' ,
20+ 'plugin:prettier/recommended' ,
21+ ] ,
1022 env : {
11- browser : true
23+ browser : true ,
1224 } ,
1325 globals : {
14- fetch : 'off' ,
15- Headers : 'off' ,
16- Request : 'off' ,
17- Response : 'off' ,
18- AbortController : 'off'
26+ require : true ,
27+ beforeEach : true ,
28+ it : true ,
29+ describe : true ,
30+ afterEach : true ,
31+ process : true ,
32+ module : true ,
1933 } ,
2034 rules : {
2135 'ember/no-new-mixins' : 'off' ,
2236 'ember/no-jquery' : 'error' ,
23- 'no-console' : [ 'error' , { allow : [ 'warn' ] } ]
37+ 'no-console' : [ 'error' , { allow : [ 'warn' ] } ] ,
38+ 'ember/no-classic-classes' : 'off' ,
39+ 'ember/no-actions-hash' : 'off' ,
2440 } ,
2541 overrides : [
2642 // TypeScript files
@@ -30,45 +46,40 @@ module.exports = {
3046 plugins : [ '@typescript-eslint' ] ,
3147 rules : {
3248 'no-undef' : 'off' ,
33- 'no-unused-var' : 'off'
34- }
49+ 'no-unused-var' : 'off' ,
50+ } ,
3551 } ,
3652 // node files
3753 {
3854 files : [
39- '.eslintrc.js' ,
40- '.template-lintrc.js' ,
41- 'ember-cli-build.js' ,
42- 'index.js' ,
43- 'testem.js' ,
44- 'blueprints/*/index.js' ,
45- 'config/**/*.js' ,
46- 'test/**/*.js' ,
47- 'tests/dummy/config/**/*.js'
55+ './.eslintrc.js' ,
56+ './.prettierrc.js' ,
57+ './.stylelintrc.js' ,
58+ './.template-lintrc.js' ,
59+ './ember-cli-build.js' ,
60+ './index.js' ,
61+ './testem.js' ,
62+ './blueprints/*/index.js' ,
63+ './config/**/*.js' ,
64+ './tests/dummy/config/**/*.js' ,
4865 ] ,
49- excludedFiles : [ 'app/**' , 'addon-test-support/**' , 'addon/**' , 'tests/dummy/app/**' ] ,
5066 parserOptions : {
51- sourceType : 'script'
67+ sourceType : 'script' ,
5268 } ,
5369 env : {
5470 browser : false ,
55- node : true
56- } ,
57- plugins : [ 'node' ] ,
58- rules : Object . assign ( { } , require ( 'eslint-plugin-node' ) . configs . recommended . rules , {
59- // add your custom rules and overrides for node files here
60- } )
61- } ,
62- // node tests
63- {
64- files : [ 'test/**/*.js' ] ,
65- env : {
66- mocha : true
71+ node : true ,
6772 } ,
73+ extends : [ 'plugin:n/recommended' ] ,
6874 rules : {
6975 'node/no-unpublished-require' : 'off' ,
70- 'node/no-extraneous-require' : 'off'
71- }
72- }
73- ]
76+ 'node/no-extraneous-require' : 'off' ,
77+ } ,
78+ } ,
79+ {
80+ // test files
81+ files : [ 'tests/**/*-test.{js,ts}' ] ,
82+ extends : [ 'plugin:qunit/recommended' ] ,
83+ } ,
84+ ] ,
7485} ;
0 commit comments