-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alternative to #1631
- Loading branch information
Showing
12 changed files
with
210 additions
and
865 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import globals from "globals"; | ||
import jsPlugin from "@eslint/js"; | ||
import tsPlugin from "typescript-eslint"; | ||
import prettierOverrides from "eslint-config-prettier"; | ||
import prettierRules from "eslint-plugin-prettier/recommended"; | ||
import unicornPlugin from "eslint-plugin-unicorn"; | ||
import importPlugin from "eslint-plugin-import-x"; | ||
|
||
export default [ | ||
{ | ||
languageOptions: { globals: globals.node }, | ||
plugins: { | ||
unicorn: unicornPlugin, | ||
"import-x": importPlugin, | ||
}, | ||
}, | ||
jsPlugin.configs.recommended, | ||
...tsPlugin.configs.recommended, | ||
prettierOverrides, | ||
prettierRules, | ||
// Things to turn off | ||
{ ignores: ["dist/", "coverage/"] }, | ||
{ | ||
rules: { | ||
"no-empty": ["error", { allowEmptyCatch: true }], | ||
"no-empty-pattern": ["error", { allowObjectPatternsAsParameters: true }], | ||
"@typescript-eslint/no-empty-object-type": "off", // @todo remove | ||
"@typescript-eslint/no-explicit-any": "off", // @todo remove | ||
}, | ||
}, | ||
// Things to turn on globally | ||
{ | ||
rules: { | ||
"unicorn/prefer-node-protocol": "error", | ||
"import-x/named": "error", | ||
"import-x/export": "error", | ||
"import-x/no-duplicates": "warn", | ||
}, | ||
}, | ||
// For the sources | ||
{ | ||
files: ["src/*.ts"], | ||
rules: { | ||
"import-x/no-extraneous-dependencies": "error", | ||
}, | ||
}, | ||
// Special needs of plugin | ||
{ | ||
files: ["src/zod-plugin.ts"], | ||
rules: { | ||
"@typescript-eslint/no-unused-vars": "off", | ||
}, | ||
}, | ||
// Special needs of the generated code | ||
{ | ||
files: ["tests/*/quick-start.ts"], | ||
rules: { | ||
"prettier/prettier": "off", | ||
"import-x/no-duplicates": "off", | ||
}, | ||
}, | ||
]; |
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
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
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
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.