eslint-webpack-plugin icon indicating copy to clipboard operation
eslint-webpack-plugin copied to clipboard

Strictnullchecks is set to true in tsconfig.json, the plugin does not report null and undefined errors

Open lalLAL95828 opened this issue 3 years ago • 1 comments
trafficstars

tscofig.json

{
    "compilerOptions": {
        "outDir": "./dist/",
        "sourceMap": true,
        "noImplicitAny": true,
        "target": "es5",
        "jsx": "react",
        "allowSyntheticDefaultImports":true,
        "lib": [
            "dom",
            "dom.iterable",
            "esnext"
        ],
        "allowJs": true,
        "skipLibCheck": true,
        "esModuleInterop": true,
        "noImplicitThis":true,
        "strictNullChecks": true,

        "forceConsistentCasingInFileNames": true,
        "module": "commonjs",
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "isolatedModules": true,
        "noEmit": true,

        "baseUrl": ".",
		"paths": {
			"@/*": ["src/*"]
		}
    },
    "include": [
        "src"
    ]
}

.eslintrc.js

//eslint-disable-next-line
module.exports = {
    "env": {
        "browser": true,
        "es2021": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:react/recommended",
        "plugin:react/jsx-runtime",
        "plugin:@typescript-eslint/recommended"
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": "latest",
        "sourceType": "module"
    },
    "plugins": [
        "react",
        "react-hooks",
        "@typescript-eslint"
        
    ],
    "rules": {
        "no-debugger": "off",
        "@typescript-eslint/no-unused-vars":["warn", { "varsIgnorePattern": "^React$" }],
        "react-hooks/rules-of-hooks": "error",
        "react-hooks/exhaustive-deps": "off"
    }
}

lalLAL95828 avatar Mar 29 '22 09:03 lalLAL95828

Hi @lalLAL95828 Could you provide a repository? I believe it is some wrong configuration in eslint

ricardogobbosouza avatar Jun 23 '22 17:06 ricardogobbosouza