Skip to content

Commit

Permalink
WIP use eslint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Feb 13, 2024
1 parent 95246b0 commit 8fdf546
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config({
plugins: {
"@typescript-eslint": tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
},
},
rules: {
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"scripts": {
"build": "tsc",
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint 'src/**/*.ts'",
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint 'src/**/*.ts' -c eslint.config.mjs",
"release": "yarn build && changeset publish",
"test": "vitest"
},
Expand Down

0 comments on commit 8fdf546

Please sign in to comment.