forked from egoist/tailwindcss-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update ts eslint prettier config
- Loading branch information
Showing
15 changed files
with
1,122 additions
and
68 deletions.
There are no files selected for viewing
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,3 +1,5 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.experimental.useFlatConfig": true | ||
} |
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,54 @@ | ||
import process from "node:process" | ||
import ts from "@typescript-eslint/eslint-plugin" | ||
import tsParser from "@typescript-eslint/parser" | ||
import eslintConfigPrettier from "eslint-config-prettier" | ||
|
||
const files = ["src/**/*.ts"] | ||
const languageOptions = { | ||
parser: tsParser, | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: process.cwd(), | ||
}, | ||
} | ||
const linterOptions = { | ||
reportUnusedDisableDirectives: true, | ||
} | ||
const plugins = { | ||
"@typescript-eslint": ts, | ||
} | ||
|
||
export default [ | ||
// don't lint js files | ||
{ | ||
ignores: ["**/*.js", "**/*.cjs", "**/*.mjs"], | ||
}, | ||
{ | ||
files, | ||
languageOptions, | ||
linterOptions, | ||
plugins, | ||
rules: { | ||
...ts.configs["eslint-recommended"].overrides[0].rules, | ||
...ts.configs["recommended"].rules, | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
}, | ||
], | ||
|
||
"@typescript-eslint/no-non-null-assertion": "off", | ||
|
||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/consistent-type-exports": "error", | ||
"@typescript-eslint/no-import-type-side-effects": "error", | ||
|
||
"no-console": ["warn", { allow: ["warn", "error"] }], | ||
}, | ||
}, | ||
// disable formatting rules, make sure to put this last | ||
eslintConfigPrettier, | ||
] |
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,3 +1,3 @@ | ||
{ | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} | ||
} |
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 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
Oops, something went wrong.