File tree Expand file tree Collapse file tree 3 files changed +92
-0
lines changed Expand file tree Collapse file tree 3 files changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -235,4 +235,30 @@ module.exports = [
235
235
'unicorn/filename-case' : 'off' ,
236
236
} ,
237
237
} ,
238
+ {
239
+ files : [ '**/*.mjs' ] ,
240
+ languageOptions : {
241
+ parser : babelEslintParser ,
242
+ parserOptions : {
243
+ ecmaFeatures : { modules : true } ,
244
+ ecmaVersion : 2022 ,
245
+ babelOptions : {
246
+ configFile : require . resolve ( './.babelrc' ) ,
247
+ } ,
248
+ } ,
249
+ } ,
250
+ rules : {
251
+ // Extensions are required in ESM
252
+ 'import/extensions' : [ 'error' , 'ignorePackages' ] ,
253
+ // These don't appear to work correctly
254
+ // All these throw on the import of a dependency
255
+ 'import/namespace' : 'off' ,
256
+ 'import/no-deprecated' : 'off' ,
257
+ 'import/default' : 'off' ,
258
+ 'import/no-named-as-default' : 'off' ,
259
+ 'import/no-named-as-default-member' : 'off' ,
260
+ 'import/no-unresalved' : 'off' ,
261
+ 'import/no-missing-import' : 'off' ,
262
+ } ,
263
+ } ,
238
264
] ;
Original file line number Diff line number Diff line change
1
+ import emberPlugin from './index.js' ;
2
+ import baseRules from './recommended-rules.js' ;
3
+ import gjsRules from './recommended-rules-gjs.js' ;
4
+ import gtsRules from './recommended-rules-gts.js' ;
5
+ import emberParser from 'ember-eslint-parser' ;
6
+
7
+ export const plugin = emberPlugin ;
8
+ export const parser = emberParser ;
9
+
10
+ export const base = {
11
+ files : [ '**/*.{js,ts}' ] ,
12
+ plugins : { ember : emberPlugin } ,
13
+ rules : {
14
+ ...baseRules ,
15
+ } ,
16
+ } ;
17
+
18
+ export const gjs = {
19
+ plugins : { ember : emberPlugin } ,
20
+ files : [ '**/*.gjs' ] ,
21
+ languageOptions : {
22
+ parser : emberParser ,
23
+ parserOptions : {
24
+ ecmaFeatures : { modules : true } ,
25
+ ecmaVersion : 'latest' ,
26
+ // babel config options should be supplied in the consuming project
27
+ } ,
28
+ } ,
29
+ processor : 'ember/noop' ,
30
+ rules : {
31
+ ...base . rules ,
32
+ ...gjsRules ,
33
+ } ,
34
+ } ;
35
+
36
+ export const gts = {
37
+ plugins : { ember : emberPlugin } ,
38
+ files : [ '**/*.gts' ] ,
39
+ languageOptions : {
40
+ parser : emberParser ,
41
+ parserOptions : {
42
+ extraFileExtensions : [ '.gts' ] ,
43
+ } ,
44
+ // parser options should be supplied in the consuming project
45
+ } ,
46
+ processor : 'ember/noop' ,
47
+ rules : {
48
+ ...base . rules ,
49
+ ...gtsRules ,
50
+ } ,
51
+ } ;
52
+
53
+ export default {
54
+ // Helpful utility exports
55
+ plugin,
56
+ parser,
57
+ // Recommended config sets
58
+ configs : {
59
+ base,
60
+ gjs,
61
+ gts,
62
+ } ,
63
+ } ;
Original file line number Diff line number Diff line change 23
23
"license" : " MIT" ,
24
24
"exports" : {
25
25
"." : " ./lib/index.js" ,
26
+ "./recommended" : {
27
+ "import" : " ./lib/recommended.mjs"
28
+ },
26
29
"./configs/*" : " ./lib/config/*.js"
27
30
},
28
31
"main" : " ./lib/index.js" ,
You can’t perform that action at this time.
0 commit comments