-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2191 from NullVoxPopuli/better-gjs-exports
Provide better gjs/gts config support for eslint 9
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import emberPlugin from './index.js'; | ||
import baseRules from './recommended-rules.js'; | ||
import gjsRules from './recommended-rules-gjs.js'; | ||
import gtsRules from './recommended-rules-gts.js'; | ||
import emberParser from 'ember-eslint-parser'; | ||
|
||
export const plugin = emberPlugin; | ||
export const parser = emberParser; | ||
|
||
export const base = { | ||
files: ['**/*.{js,ts}'], | ||
plugins: { ember: emberPlugin }, | ||
rules: { | ||
...baseRules, | ||
}, | ||
}; | ||
|
||
export const gjs = { | ||
plugins: { ember: emberPlugin }, | ||
files: ['**/*.gjs'], | ||
languageOptions: { | ||
parser: emberParser, | ||
parserOptions: { | ||
ecmaFeatures: { modules: true }, | ||
ecmaVersion: 'latest', | ||
// babel config options should be supplied in the consuming project | ||
}, | ||
}, | ||
processor: 'ember/noop', | ||
rules: { | ||
...base.rules, | ||
...gjsRules, | ||
}, | ||
}; | ||
|
||
export const gts = { | ||
plugins: { ember: emberPlugin }, | ||
files: ['**/*.gts'], | ||
languageOptions: { | ||
parser: emberParser, | ||
parserOptions: { | ||
extraFileExtensions: ['.gts'], | ||
}, | ||
// parser options should be supplied in the consuming project | ||
}, | ||
processor: 'ember/noop', | ||
rules: { | ||
...base.rules, | ||
...gtsRules, | ||
}, | ||
}; | ||
|
||
export default { | ||
// Helpful utility exports | ||
plugin, | ||
parser, | ||
// Recommended config sets | ||
configs: { | ||
base, | ||
gjs, | ||
gts, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters