-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade dev dependencies, including eslint (#767)
- Loading branch information
1 parent
64a3b61
commit d698ccc
Showing
12 changed files
with
3,058 additions
and
638 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
const eslintJs = require("@eslint/js"); | ||
const eslintPluginReact = require("eslint-plugin-react"); | ||
const globals = require("globals"); | ||
const typescriptEslint = require("typescript-eslint"); | ||
|
||
module.exports = [ | ||
eslintJs.configs.recommended, | ||
typescriptEslint.configs.eslintRecommended, | ||
{ | ||
settings: { | ||
react: { | ||
version: "18.3.1", | ||
}, | ||
}, | ||
...eslintPluginReact.configs.flat.recommended, | ||
}, | ||
...typescriptEslint.configs.strictTypeChecked, | ||
...typescriptEslint.configs.stylisticTypeChecked, | ||
{ | ||
name: "react-to-print/base", | ||
files: [ | ||
"**/*.ts", | ||
"**/*.tsx", | ||
], | ||
languageOptions: { | ||
ecmaVersion: 5, | ||
globals: { | ||
...globals.browser, | ||
}, | ||
parser: typescriptEslint.parser, | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
projectService: true, | ||
}, | ||
sourceType: "module", | ||
}, | ||
linterOptions: { | ||
reportUnusedDisableDirectives: "error", | ||
}, | ||
plugins: { | ||
"@typescript-eslint": typescriptEslint.plugin, | ||
}, | ||
rules: { | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/non-nullable-type-assertion-style": "off", | ||
"@typescript-eslint/prefer-for-of": "off", | ||
"@typescript-eslint/restrict-template-expressions": ["error", { | ||
allowNumber: true, | ||
}], | ||
"max-len": ["error", { | ||
code: 120, | ||
ignoreComments: true, | ||
ignoreStrings: true, | ||
}], | ||
}, | ||
} | ||
]; |
Oops, something went wrong.