-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Updated eslint to v9 * chore: Updated shared eslint configurations * chore: Updated project configurations * chore: Fixed lint errors * chore: Added lockfile * chore: Added changeset --------- Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
- Loading branch information
Showing
75 changed files
with
1,157 additions
and
941 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
"ember-codemod-remove-ember-css-modules": patch | ||
"my-app-with-ember-css-modules": patch | ||
"embroider-css-modules": patch | ||
"test-app-for-embroider-css-modules": patch | ||
"type-css-modules": patch | ||
"test-app-for-my-v2-addon": patch | ||
"my-v1-addon": patch | ||
"my-v2-addon": patch | ||
"my-app": patch | ||
--- | ||
|
||
Updated eslint to v9 |
File renamed without changes.
File renamed without changes.
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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,109 +1,181 @@ | ||
'use strict'; | ||
import babelEslintParser from '@babel/eslint-parser'; | ||
import eslint from '@eslint/js'; | ||
// eslint-disable-next-line import/no-unresolved | ||
import eslintPluginEmber from 'eslint-plugin-ember/recommended'; | ||
import eslintPluginImport from 'eslint-plugin-import'; | ||
import eslintPluginN from 'eslint-plugin-n'; | ||
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended'; | ||
import eslintPluginQunit from 'eslint-plugin-qunit'; | ||
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort'; | ||
import eslintPluginTypescriptSortKeys from 'eslint-plugin-typescript-sort-keys'; | ||
import globals from 'globals'; | ||
// eslint-disable-next-line import/no-unresolved | ||
import tseslint from 'typescript-eslint'; | ||
|
||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
const parserOptionsJs = { | ||
babelOptions: { | ||
plugins: [ | ||
[ | ||
'@babel/plugin-proposal-decorators', | ||
{ | ||
decoratorsBeforeExport: true, | ||
}, | ||
], | ||
], | ||
}, | ||
ecmaFeatures: { | ||
modules: true, | ||
}, | ||
plugins: [ | ||
'ember', | ||
'@typescript-eslint', | ||
'simple-import-sort', | ||
'typescript-sort-keys', | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:ember/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:prettier/recommended', | ||
'plugin:typescript-sort-keys/recommended', | ||
], | ||
env: { | ||
browser: true, | ||
ecmaVersion: 'latest', | ||
requireConfigFile: false, | ||
}; | ||
|
||
const parserOptionsTs = { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}; | ||
|
||
export default tseslint.config( | ||
{ | ||
ignores: ['dist/', 'node_modules/', '!.*', '.*/'], | ||
}, | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'error', | ||
}, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.gjs', '.gts', '.js', '.ts'], | ||
}, | ||
typescript: true, | ||
{ | ||
plugins: { | ||
'simple-import-sort': eslintPluginSimpleImportSort, | ||
}, | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
}, | ||
}, | ||
|
||
eslint.configs.recommended, | ||
eslintPluginEmber.configs.base, | ||
eslintPluginEmber.configs.gjs, | ||
eslintPluginImport.flatConfigs.recommended, | ||
eslintPluginPrettier, | ||
|
||
// Ember files | ||
{ | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
parser: babelEslintParser, | ||
}, | ||
}, | ||
overrides: [ | ||
// Ember files | ||
{ | ||
files: ['**/*.{gts,ts}'], | ||
extends: [ | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
{ | ||
files: ['**/*.{gjs,js}'], | ||
languageOptions: { | ||
globals: globals.browser, | ||
parserOptions: parserOptionsJs, | ||
}, | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
'import/no-unresolved': [ | ||
'error', | ||
{ | ||
ignore: ['^@ember', '^ember', 'fetch'], | ||
}, | ||
], | ||
rules: { | ||
'@typescript-eslint/array-type': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-empty-object-type': [ | ||
'error', | ||
{ | ||
allowInterfaces: 'always', | ||
allowObjectTypes: 'always', | ||
}, | ||
], | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.gts'], | ||
parser: 'ember-eslint-parser', | ||
extends: ['plugin:ember/recommended-gts'], | ||
}, | ||
{ | ||
files: ['**/*.gjs'], | ||
parser: 'ember-eslint-parser', | ||
extends: ['plugin:ember/recommended-gjs'], | ||
}, | ||
{ | ||
files: ['**/*.{gjs,gts,js,ts}'], | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
'import/no-unresolved': [ | ||
'error', | ||
{ ignore: ['^@ember', '^dummy/', '^ember', 'fetch'] }, | ||
], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.gjs', '.gts', '.js', '.ts'], | ||
}, | ||
}, | ||
}, | ||
// Node files | ||
{ | ||
files: [ | ||
'./.eslintrc.{cjs,js}', | ||
'./.prettierrc.{cjs,js}', | ||
'./.stylelintrc.{cjs,js}', | ||
'./.template-lintrc.{cjs,js}', | ||
'./ember-cli-build.js', | ||
'./postcss.config.js', | ||
'./testem.js', | ||
'./vite.config.{js,mjs}', | ||
'./blueprints/*/index.js', | ||
'./config/**/*.js', | ||
'./lib/*/index.js', | ||
'./server/**/*.js', | ||
}, | ||
{ | ||
extends: [ | ||
...tseslint.configs.recommended, | ||
eslintPluginEmber.configs.gts, | ||
eslintPluginImport.flatConfigs.typescript, | ||
], | ||
files: ['**/*.{gts,ts}'], | ||
languageOptions: { | ||
parser: eslintPluginEmber.parser, | ||
parserOptions: parserOptionsTs, | ||
}, | ||
plugins: { | ||
'typescript-sort-keys': eslintPluginTypescriptSortKeys, | ||
}, | ||
rules: { | ||
'@typescript-eslint/array-type': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-empty-object-type': [ | ||
'error', | ||
{ | ||
allowInterfaces: 'always', | ||
allowObjectTypes: 'always', | ||
}, | ||
], | ||
env: { | ||
browser: false, | ||
node: true, | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
'import/no-duplicates': 'error', | ||
'import/no-unresolved': [ | ||
'error', | ||
{ | ||
ignore: ['^@ember', '^ember', 'fetch'], | ||
}, | ||
], | ||
'typescript-sort-keys/interface': 'error', | ||
'typescript-sort-keys/string-enum': 'error', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.gjs', '.gts', '.js', '.ts'], | ||
}, | ||
typescript: true, | ||
}, | ||
extends: ['plugin:n/recommended'], | ||
}, | ||
// Test files | ||
{ | ||
files: ['tests/**/*-test.{gjs,gts,js,ts}'], | ||
extends: ['plugin:qunit/recommended'], | ||
}, | ||
|
||
// Test files | ||
{ | ||
files: ['tests/**/*-test.{gjs,gts,js,ts}'], | ||
plugins: { | ||
qunit: eslintPluginQunit, | ||
}, | ||
], | ||
}; | ||
}, | ||
|
||
// Configuration files | ||
{ | ||
files: [ | ||
'**/*.cjs', | ||
'config/**/*.js', | ||
'.prettierrc.js', | ||
'.stylelintrc.js', | ||
'.template-lintrc.js', | ||
'ember-cli-build.js', | ||
'postcss.config.js', | ||
'testem.js', | ||
'vite.config.js', | ||
], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: globals.node, | ||
sourceType: 'script', | ||
}, | ||
plugins: { | ||
n: eslintPluginN, | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.mjs'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: globals.node, | ||
parserOptions: parserOptionsJs, | ||
sourceType: 'module', | ||
}, | ||
plugins: { | ||
n: eslintPluginN, | ||
}, | ||
}, | ||
); |
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,3 @@ | ||
import eslintConfigNodeJavascript from '@shared-configs/eslint-config-node/javascript/index.js'; | ||
|
||
export default eslintConfigNodeJavascript; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.