Skip to content

Commit

Permalink
chore(deps): update eslint to v9 (#178)
Browse files Browse the repository at this point in the history
eslintをv9に
  • Loading branch information
hulk510 authored Aug 9, 2024
1 parent bf68175 commit 1ee5019
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 1,572 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

80 changes: 0 additions & 80 deletions .eslintrc.yml

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// @ts-check

import js from '@eslint/js'
import prettier from 'eslint-config-prettier'
import jest from 'eslint-plugin-jest'
import globals from 'globals'
import tslint from 'typescript-eslint'

export default tslint.config(
{
name: 'base/ignoreFiles',
ignores: ['lib/', 'dist/', 'coverage/']
},
{
name: 'base/defaultMatches',
files: ['**/*.{js,mjs,cjs,ts}']
},
{
name: 'base/globals',
languageOptions: {
globals: {
...globals.node,
...globals.jest,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
}
}
},
js.configs.recommended,
tslint.configs.eslintRecommended,
...tslint.configs.recommended,
{
name: 'base/projectRules',
plugins: {
'@typescript-eslint': tslint.plugin
},
languageOptions: {
parser: tslint.parser,
parserOptions: {
sourceType: 'module',
ecmaVersion: 2023,
project: ['tsconfig.json', 'tsconfig.*.json']
}
},
rules: {
camelcase: 'off',
'eslint-comments/no-use': 'off',
'eslint-comments/no-unused-disable': 'off',
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
semi: 'off',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{ accessibility: 'no-public' }
],
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowExpressions: true }
],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-function-type': 'warn',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/unbound-method': 'error'
}
},
{
name: 'jest/rules',
files: ['__tests__/**/*.{js,mjs,cjs,ts}'],
...jest.configs['flat/recommended']
},
prettier
)
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"coverage": "make-coverage-badge --output-path ./badges/coverage.svg",
"format:write": "prettier --write **/*.ts",
"format:check": "prettier --check **/*.ts",
"lint": "eslint . -c ./.eslintrc.yml",
"lint": "eslint .",
"package": "ncc build src/index.ts --license licenses.txt",
"package:watch": "pnpm run package -- --watch",
"test": "jest",
Expand Down Expand Up @@ -71,22 +71,24 @@
"valibot": "0.37.0"
},
"devDependencies": {
"@eslint/js": "9.8.0",
"@octokit/openapi-types": "22.2.0",
"@types/eslint-config-prettier": "6.11.3",
"@types/eslint__js": "8.42.3",
"@types/jest": "29.5.12",
"@types/node": "20.14.14",
"@typescript-eslint/eslint-plugin": "8.0.1",
"@typescript-eslint/parser": "8.0.1",
"@vercel/ncc": "0.38.1",
"eslint": "8.57.0",
"eslint-plugin-github": "5.0.1",
"eslint": "9.8.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jest": "28.8.0",
"eslint-plugin-jsonc": "2.16.0",
"eslint-plugin-prettier": "5.2.1",
"globals": "15.9.0",
"jest": "29.7.0",
"make-coverage-badge": "1.2.0",
"prettier": "3.3.3",
"prettier-eslint": "16.3.0",
"ts-jest": "29.2.4",
"typescript": "5.5.4"
"typescript": "5.5.4",
"typescript-eslint": "8.0.1"
}
}
Loading

0 comments on commit 1ee5019

Please sign in to comment.