-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update to eslint9 * fix lint issues * Undo code change
- Loading branch information
Showing
186 changed files
with
1,550 additions
and
1,250 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 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,17 +1,18 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"search.exclude": { | ||
"dist": true, | ||
"bin": true | ||
"dist": true | ||
}, | ||
"files.trimTrailingWhitespace": true, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"files.insertFinalNewline": true, | ||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], | ||
"eslint.validate": ["javascript", "javascriptreact", "typescript"], | ||
"editor.tabSize": 4, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"jest.autoRun": "off" | ||
"eslint.experimental.useFlatConfig": true, | ||
"jest.runMode": "on-demand", | ||
"javascript.preferences.importModuleSpecifierEnding": "js" | ||
} |
File renamed without changes.
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,2 +1,2 @@ | ||
#!/usr/bin/env node | ||
require('../dist/ts-json-schema-generator'); | ||
import("../dist/ts-json-schema-generator.js"); |
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,78 @@ | ||
import eslint from "@eslint/js"; | ||
import globals from "globals"; | ||
import tseslint from "typescript-eslint"; | ||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; | ||
|
||
/** @type {import('@types/eslint').Linter.FlatConfig[]} */ | ||
export default tseslint.config( | ||
{ | ||
ignores: ["dist"], | ||
}, | ||
eslint.configs.recommended, | ||
{ | ||
files: [ | ||
"ts-json-schema-generator.ts", | ||
"index.ts", | ||
"src/**/*.ts", | ||
"factory/**/*.ts", | ||
"bin/**", | ||
"test/**/*.test.ts", | ||
"test/utils.ts", | ||
], | ||
extends: tseslint.configs.recommendedTypeChecked, | ||
languageOptions: { | ||
sourceType: "module", | ||
parserOptions: { | ||
project: "tsconfig.eslint.json", | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
rules: { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/prefer-for-of": "error", | ||
"@typescript-eslint/no-require-imports": "error", | ||
"@typescript-eslint/no-parameter-properties": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
vars: "all", | ||
args: "none", | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
"@typescript-eslint/no-object-literal-type-assertion": "off", | ||
"@typescript-eslint/no-namespace": "error", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "warn", | ||
"@typescript-eslint/no-unsafe-member-access": "warn", | ||
"@typescript-eslint/no-unsafe-return": "warn", | ||
"@typescript-eslint/no-unsafe-argument": "warn", | ||
"@typescript-eslint/no-unsafe-call": "warn", | ||
"@typescript-eslint/no-floating-promises": "off", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "warn", | ||
"no-alert": "error", | ||
"prefer-const": "error", | ||
"no-return-assign": "error", | ||
"no-useless-call": "error", | ||
"no-shadow": "error", | ||
"no-useless-concat": "error", | ||
"no-undef": "off", | ||
"no-prototype-builtins": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["*.js"], | ||
...tseslint.configs.disableTypeChecked, | ||
}, | ||
{ | ||
files: ["test/**/*.test.ts"], | ||
languageOptions: { | ||
globals: { | ||
...globals.jest, | ||
}, | ||
}, | ||
}, | ||
eslintPluginPrettierRecommended | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from "./formatter"; | ||
export * from "./generator"; | ||
export * from "./parser"; | ||
export * from "./program"; | ||
export * from "./formatter.js"; | ||
export * from "./generator.js"; | ||
export * from "./parser.js"; | ||
export * from "./program.js"; |
Oops, something went wrong.