-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Updated dependencies * chore: Updated @shared-configs/eslint-config-node * chore: Updated eslint to v9 * chore: Fixed lint errors * chore: Enforced ESM * chore: Added lockfile * chore: Added changeset --------- Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
- Loading branch information
Showing
62 changed files
with
979 additions
and
823 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,12 @@ | ||
--- | ||
"@codemod-utils/ast-javascript": patch | ||
"@codemod-utils/ast-template": patch | ||
"@codemod-utils/blueprints": patch | ||
"@codemod-utils/ember": patch | ||
"@codemod-utils/files": patch | ||
"@codemod-utils/tests": patch | ||
"@codemod-utils/json": patch | ||
"@codemod-utils/cli": patch | ||
--- | ||
|
||
Updated eslint to v9 |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import eslintConfigNodeJavascript from './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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,88 @@ | ||
'use strict'; | ||
import babelEslintParser from '@babel/eslint-parser'; | ||
import eslint from '@eslint/js'; | ||
import eslintPluginImport from 'eslint-plugin-import'; | ||
import eslintPluginN from 'eslint-plugin-n'; | ||
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended'; | ||
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort'; | ||
import globals from 'globals'; | ||
|
||
module.exports = { | ||
root: true, | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
requireConfigFile: false, | ||
sourceType: 'module', | ||
const parserOptionsJs = { | ||
babelOptions: { | ||
plugins: [ | ||
[ | ||
'@babel/plugin-proposal-decorators', | ||
{ | ||
decoratorsBeforeExport: true, | ||
}, | ||
], | ||
], | ||
}, | ||
plugins: ['simple-import-sort'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/recommended', | ||
'plugin:n/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
ecmaFeatures: { | ||
modules: true, | ||
}, | ||
overrides: [ | ||
// JavaScript files | ||
{ | ||
files: ['**/*.{cjs,js}'], | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
ecmaVersion: 'latest', | ||
requireConfigFile: false, | ||
}; | ||
|
||
export default [ | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'error', | ||
}, | ||
}, | ||
{ | ||
plugins: { | ||
'simple-import-sort': eslintPluginSimpleImportSort, | ||
}, | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
}, | ||
}, | ||
|
||
eslint.configs.recommended, | ||
eslintPluginImport.flatConfigs.recommended, | ||
eslintPluginPrettier, | ||
|
||
// JavaScript files | ||
{ | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
parser: babelEslintParser, | ||
parserOptions: parserOptionsJs, | ||
}, | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
}, | ||
}, | ||
|
||
// Node files | ||
{ | ||
files: ['**/*.cjs'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: { | ||
...globals.node, | ||
}, | ||
sourceType: 'script', | ||
}, | ||
plugins: { | ||
n: eslintPluginN, | ||
}, | ||
// Node files | ||
{ | ||
files: ['./.eslintrc.{cjs,js}', './.prettierrc.{cjs,js}'], | ||
env: { | ||
browser: false, | ||
node: true, | ||
}, | ||
{ | ||
files: ['**/*.mjs'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: { | ||
...globals.node, | ||
}, | ||
extends: ['plugin:n/recommended'], | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,125 @@ | ||
'use strict'; | ||
import babelEslintParser from '@babel/eslint-parser'; | ||
import eslint from '@eslint/js'; | ||
import eslintPluginImport from 'eslint-plugin-import'; | ||
import eslintPluginN from 'eslint-plugin-n'; | ||
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended'; | ||
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, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
project: true, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['simple-import-sort'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/recommended', | ||
'plugin:n/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: true, | ||
typescript: true, | ||
}, | ||
}, | ||
overrides: [ | ||
// TypeScript files | ||
{ | ||
files: ['**/*.{cts,ts}'], | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/typescript', | ||
'plugin:typescript-sort-keys/recommended', | ||
const parserOptionsJs = { | ||
babelOptions: { | ||
plugins: [ | ||
[ | ||
'@babel/plugin-proposal-decorators', | ||
{ | ||
decoratorsBeforeExport: true, | ||
}, | ||
], | ||
rules: { | ||
'@typescript-eslint/array-type': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
'import/no-duplicates': 'error', | ||
], | ||
}, | ||
ecmaFeatures: { | ||
modules: true, | ||
}, | ||
ecmaVersion: 'latest', | ||
requireConfigFile: false, | ||
}; | ||
|
||
const parserOptionsTs = { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}; | ||
|
||
export default tseslint.config( | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'error', | ||
}, | ||
}, | ||
{ | ||
plugins: { | ||
'simple-import-sort': eslintPluginSimpleImportSort, | ||
}, | ||
rules: { | ||
curly: 'error', | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
}, | ||
}, | ||
|
||
eslint.configs.recommended, | ||
eslintPluginImport.flatConfigs.recommended, | ||
eslintPluginPrettier, | ||
|
||
// JavaScript files | ||
{ | ||
files: ['**/*.js'], | ||
languageOptions: { | ||
parser: babelEslintParser, | ||
parserOptions: parserOptionsJs, | ||
}, | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
}, | ||
}, | ||
|
||
// TypeScript files | ||
{ | ||
extends: [ | ||
...tseslint.configs.recommended, | ||
eslintPluginImport.flatConfigs.typescript, | ||
], | ||
files: ['**/*.ts'], | ||
languageOptions: { | ||
parserOptions: parserOptionsTs, | ||
}, | ||
plugins: { | ||
'typescript-sort-keys': eslintPluginTypescriptSortKeys, | ||
}, | ||
rules: { | ||
'@typescript-eslint/array-type': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
'import/no-duplicates': 'error', | ||
'typescript-sort-keys/interface': 'error', | ||
'typescript-sort-keys/string-enum': 'error', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: true, | ||
typescript: true, | ||
}, | ||
}, | ||
// JavaScript files | ||
{ | ||
files: ['**/*.{cjs,js}'], | ||
rules: { | ||
'import/no-duplicates': 'error', | ||
}, | ||
|
||
// Node files | ||
{ | ||
files: ['**/*.cjs'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: { | ||
...globals.node, | ||
}, | ||
sourceType: 'script', | ||
}, | ||
// Node files | ||
{ | ||
files: ['./.eslintrc.{cjs,js}', './.prettierrc.{cjs,js}'], | ||
env: { | ||
browser: false, | ||
node: true, | ||
plugins: { | ||
n: eslintPluginN, | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.mjs'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: { | ||
...globals.node, | ||
}, | ||
extends: ['plugin:n/recommended'], | ||
parserOptions: parserOptionsJs, | ||
sourceType: 'module', | ||
}, | ||
], | ||
}; | ||
plugins: { | ||
n: eslintPluginN, | ||
}, | ||
}, | ||
); |
File renamed without changes.
Oops, something went wrong.