Skip to content

Commit

Permalink
chore: ESLint 9への移行 (#DTB-2203) (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-se authored Jun 10, 2024
1 parent 033864b commit 749d465
Show file tree
Hide file tree
Showing 6 changed files with 264 additions and 979 deletions.
63 changes: 0 additions & 63 deletions .eslintrc.json

This file was deleted.

40 changes: 40 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// @ts-check
import eslint from "@eslint/js";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/restrict-template-expressions": "off",
},
},
{
plugins: {
"simple-import-sort": simpleImportSort,
},
rules: {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
},
},
eslintPluginPrettierRecommended, // Make sure to put it last, so it gets the chance to override other configs.
);
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@
"buildpush:dev": " pnpm run build && cp appsscript.json build/appsscript.json && clasp_config_project=.clasp.dev.json clasp push --force",
"postinstall": "mkdir -p build && cp appsscript.json build/appsscript.json"
},
"dependencies": {},
"devDependencies": {
"@eslint/js": "^9.4.0",
"@google/clasp": "^2.4.2",
"@types/eslint__js": "^8.42.3",
"@types/google-apps-script": "^1.0.83",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"esbuild": "^0.20.2",
"esbuild-gas-plugin": "^0.8.0",
"eslint": "^8.56.0",
"eslint": "^9.4.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-simple-import-sort": "^12.1.0",
"prettier": "^3.2.5",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"typescript-eslint": "^7.12.0"
},
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
}
Loading

0 comments on commit 749d465

Please sign in to comment.