Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Mc eslint #322

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ module.exports = {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {},
plugins: ['react', '@typescript-eslint', 'unused-imports'],
rules: {
'no-unused-vars': 1,
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
//typescript-eslint
// '@typescript-eslint/no-unsafe-any': true,
},
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unused-imports": "^2.0.0",
"express": "^4.17.1",
"html-webpack-plugin": "^5.3.2",
"husky": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/routing/Chapter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link, Outlet } from 'react-router-dom';
import { Outlet } from 'react-router-dom';
import { ChapterProps } from './types';

/**
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/* Strict Type-Checking Options */
"strict": true /* Enable all strict type-checking options. */,
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
Expand Down
23 changes: 23 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ __metadata:
eslint-config-prettier: ^8.3.0
eslint-plugin-react: ^7.24.0
eslint-plugin-react-hooks: ^4.2.0
eslint-plugin-unused-imports: ^2.0.0
express: ^4.17.1
formik: ^2.2.9
html-webpack-plugin: ^5.3.2
Expand Down Expand Up @@ -6713,6 +6714,28 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-unused-imports@npm:^2.0.0":
version: 2.0.0
resolution: "eslint-plugin-unused-imports@npm:2.0.0"
dependencies:
eslint-rule-composer: ^0.3.0
peerDependencies:
"@typescript-eslint/eslint-plugin": ^5.0.0
eslint: ^8.0.0
peerDependenciesMeta:
"@typescript-eslint/eslint-plugin":
optional: true
checksum: 8aa1e03e75da2a62a354065e0cb8fe370118c6f8d9720a32fe8c1da937de6adb81a4fed7d0d391d115ac9453b49029fb19f970d180a2cf3dba451fd4c20f0dc4
languageName: node
linkType: hard

"eslint-rule-composer@npm:^0.3.0":
version: 0.3.0
resolution: "eslint-rule-composer@npm:0.3.0"
checksum: c2f57cded8d1c8f82483e0ce28861214347e24fd79fd4144667974cd334d718f4ba05080aaef2399e3bbe36f7d6632865110227e6b176ed6daa2d676df9281b1
languageName: node
linkType: hard

"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.0.0, eslint-scope@npm:^5.1.1":
version: 5.1.1
resolution: "eslint-scope@npm:5.1.1"
Expand Down