-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions[bot]
committed
Nov 12, 2024
1 parent
166dca9
commit c22be37
Showing
7 changed files
with
160 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
plugins: ['prettier-plugin-ember-template-tag'], | ||
overrides: [ | ||
{ | ||
files: '*.{js,ts}', | ||
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}', | ||
options: { | ||
singleQuote: true, | ||
}, | ||
}, | ||
{ | ||
files: '*.{gjs,gts}', | ||
options: { | ||
singleQuote: true, | ||
templateSingleQuote: false, | ||
}, | ||
}, | ||
], | ||
}; |
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,121 @@ | ||
/** | ||
* Debugging: | ||
* https://eslint.org/docs/latest/use/configure/debug | ||
* ---------------------------------------------------- | ||
* | ||
* Print a file's calculated configuration | ||
* | ||
* npx eslint --print-config path/to/file.js | ||
* | ||
* Inspecting the config | ||
* | ||
* npx eslint --inspect-config | ||
* | ||
*/ | ||
import globals from 'globals'; | ||
import js from '@eslint/js'; | ||
|
||
import ember from 'eslint-plugin-ember/recommended'; | ||
import prettier from 'eslint-plugin-prettier/recommended'; | ||
import qunit from 'eslint-plugin-qunit'; | ||
import n from 'eslint-plugin-n'; | ||
|
||
import babelParser from '@babel/eslint-parser'; | ||
|
||
const esmParserOptions = { | ||
ecmaFeatures: { modules: true }, | ||
ecmaVersion: 'latest', | ||
requireConfigFile: false, | ||
babelOptions: { | ||
plugins: [ | ||
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], | ||
], | ||
}, | ||
}; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
prettier, | ||
ember.configs.base, | ||
ember.configs.gjs, | ||
/** | ||
* Ignores must be in their own object | ||
* https://eslint.org/docs/latest/use/configure/ignore | ||
*/ | ||
{ | ||
ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'], | ||
}, | ||
/** | ||
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options | ||
*/ | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'error', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
parser: babelParser, | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.{js,gjs}'], | ||
languageOptions: { | ||
parserOptions: esmParserOptions, | ||
globals: { | ||
...globals.browser, | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ['tests/**/*-test.{js,gjs}'], | ||
plugins: { | ||
qunit, | ||
}, | ||
}, | ||
/** | ||
* CJS node files | ||
*/ | ||
{ | ||
files: [ | ||
'**/*.cjs', | ||
'config/**/*.js', | ||
'testem.js', | ||
'testem*.js', | ||
'.prettierrc.js', | ||
'.stylelintrc.js', | ||
'.template-lintrc.js', | ||
'ember-cli-build.js', | ||
], | ||
plugins: { | ||
n, | ||
}, | ||
|
||
languageOptions: { | ||
sourceType: 'script', | ||
ecmaVersion: 'latest', | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
/** | ||
* ESM node files | ||
*/ | ||
{ | ||
files: ['**/*.mjs'], | ||
plugins: { | ||
n, | ||
}, | ||
|
||
languageOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
parserOptions: esmParserOptions, | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
]; |
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