Skip to content

Commit

Permalink
Upgrade dev dependencies, including eslint (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewHerbst authored Nov 30, 2024
1 parent 64a3b61 commit d698ccc
Show file tree
Hide file tree
Showing 12 changed files with 3,058 additions and 638 deletions.
28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

59 changes: 59 additions & 0 deletions eslint.config.js
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,
}],
},
}
];
Loading

0 comments on commit d698ccc

Please sign in to comment.