@@ -43,7 +43,14 @@ export default [
4343 * https://eslint.org/docs/latest/use/configure/ignore
4444 */
4545 {
46- ignores : [ 'dist/' , 'node_modules/' , 'coverage/' , 'test-apps/' , '!**/.*' ] ,
46+ ignores : [
47+ 'dist/' ,
48+ 'node_modules/' ,
49+ 'coverage/' ,
50+ 'test-apps/' ,
51+ 'tmp/' ,
52+ '!**/.*' ,
53+ ] ,
4754 } ,
4855 /**
4956 * https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
@@ -65,8 +72,25 @@ export default [
6572 parserOptions : esmParserOptions ,
6673 globals : {
6774 ...globals . browser ,
75+ server : true ,
6876 } ,
6977 } ,
78+ rules : {
79+ 'no-unused-vars' : [ 'error' , { args : 'none' } ] ,
80+ 'no-console' : [ 'error' , { allow : [ 'warn' , 'error' ] } ] ,
81+ 'ember/no-incorrect-calls-with-inline-anonymous-functions' : 'off' ,
82+ 'ember/require-return-from-computed' : 'off' ,
83+ 'ember/no-jquery' : 'error' ,
84+
85+ // TODO: enable these rules
86+ 'ember/classic-decorator-no-classic-methods' : 'off' ,
87+ 'ember/no-classic-classes' : 'off' ,
88+ 'ember/no-classic-components' : 'off' ,
89+ 'ember/no-component-lifecycle-hooks' : 'off' ,
90+ 'ember/no-computed-properties-in-native-classes' : 'off' ,
91+ 'ember/no-private-routing-service' : 'off' ,
92+ 'ember/no-runloop' : 'off' ,
93+ } ,
7094 } ,
7195 {
7296 files : [ 'tests/**/*-test.{js,gjs}' ] ,
@@ -80,13 +104,19 @@ export default [
80104 {
81105 files : [
82106 '**/*.cjs' ,
107+ 'blueprints/*/index.js' ,
83108 'config/**/*.js' ,
109+ 'lib/**/*.js' ,
110+ 'sandbox/index.js' ,
111+ 'tests/dummy/config/**/*.js' ,
84112 'testem.js' ,
85113 'testem*.js' ,
86114 '.prettierrc.js' ,
87115 '.stylelintrc.js' ,
88116 '.template-lintrc.js' ,
117+ '**/addon-docs.js' ,
89118 'ember-cli-build.js' ,
119+ 'index.js' ,
90120 ] ,
91121 plugins : {
92122 n,
@@ -100,6 +130,24 @@ export default [
100130 } ,
101131 } ,
102132 } ,
133+ /**
134+ * Node test files (mocha)
135+ */
136+ {
137+ files : [ 'tests-node/**/*.js' ] ,
138+ plugins : {
139+ n,
140+ } ,
141+
142+ languageOptions : {
143+ sourceType : 'script' ,
144+ ecmaVersion : 'latest' ,
145+ globals : {
146+ ...globals . node ,
147+ ...globals . mocha ,
148+ } ,
149+ } ,
150+ } ,
103151 /**
104152 * ESM node files
105153 */
0 commit comments