Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency eslint to v9 #664

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .eslintrc.js

This file was deleted.

119 changes: 119 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/* eslint-disable import/no-named-as-default-member */
import eslintContainerbase from '@containerbase/eslint-plugin';
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginImport from 'eslint-plugin-import';
import pluginPromise from 'eslint-plugin-promise';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslintJestPlugin from 'eslint-plugin-jest';

export default tseslint.config(
{
ignores: [
'**/.git/',
'**/.vscode',
'**/node_modules/',
'**/dist/',
'**/coverage/',
'**/__fixtures__/**/*',
'**/__mocks__/**/*',
'**/*.d.ts',
'**/*.generated.ts',
'tools/dist',
'patches',
],
},
{
linterOptions: {
reportUnusedDisableDirectives: true,
},
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked.map((config) => ({
...config,
files: ['**/*.{ts,js,mjs,cjs}'],
})),
...tseslint.configs.stylisticTypeChecked.map((config) => ({
...config,
files: ['**/*.{ts,js,mjs,cjs}'],
})),
eslintPluginImport.flatConfigs.errors,
eslintPluginImport.flatConfigs.warnings,
eslintPluginImport.flatConfigs.recommended,
eslintPluginImport.flatConfigs.typescript,
eslintJestPlugin.configs['flat/recommended'],
eslintJestPlugin.configs['flat/style'],
pluginPromise.configs['flat/recommended'],
eslintContainerbase.configs.all,
eslintConfigPrettier,
{
files: ['**/*.{ts,js,mjs,cjs}'],

languageOptions: {
globals: {
...globals.node,
},
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},

settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
},
{
files: ['**/*.{ts,js,mjs,cjs}'],
rules: {
camelcase: 0,
'no-param-reassign': 'warn',
'require-await': 'error',
'no-use-before-define': 0,
'no-restricted-syntax': 0,
'no-await-in-loop': 0,
'prefer-template': 'off',
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/catch-or-return': 'error',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'warn',

// TODO: fixme
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/prefer-optional-chain': 0,
'@typescript-eslint/restrict-template-expressions': 0,
},
},
{
files: ['test/**/*.{ts,js,mjs,cjs}'],
languageOptions: {
globals: {
...globals.jest,
},
},
rules: {
'prefer-destructuring': 0,
'prefer-promise-reject-errors': 0,
'import/no-extraneous-dependencies': 0,
'global-require': 0,
},
},
);
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,29 @@
"test": "run-s prettier eslint markdown-lint jest"
},
"devDependencies": {
"@containerbase/eslint-plugin": "1.1.0",
"@eslint/js": "9.14.0",
"@types/eslint-config-prettier": "6.11.3",
"@types/jest": "29.5.14",
"@types/node": "20.17.5",
"conventional-changelog-conventionalcommits": "8.0.0",
"eslint": "8.57.1",
"eslint": "9.14.0",
"eslint-config-prettier": "9.1.0",
"eslint-formatter-gha": "1.5.1",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.9.0",
"eslint-plugin-promise": "7.1.0",
"globals": "15.12.0",
"husky": "9.1.6",
"jest": "29.7.0",
"lint-staged": "15.2.10",
"markdownlint-cli2": "0.14.0",
"npm-run-all2": "7.0.1",
"prettier": "3.3.3",
"prettier-plugin-packagejson": "2.5.3",
"semantic-release": "24.2.0"
"semantic-release": "24.2.0",
"typescript-eslint": "8.14.0"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading