Config to handle Typescript projects in ESLint
This commit is contained in:
parent
818063d521
commit
ea592d32aa
|
|
@ -14,6 +14,13 @@ module.exports = {
|
|||
settings: {
|
||||
react: { version: "18" }
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['./examples/**/*'],
|
||||
// Disable Typescript specific rules, which requires a special config
|
||||
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||
},
|
||||
],
|
||||
|
||||
/**
|
||||
* ESLint rules
|
||||
|
|
@ -27,7 +34,7 @@ module.exports = {
|
|||
rules: {
|
||||
"@typescript-eslint/no-unused-vars": [2, {args: "none"}],
|
||||
"@typescript-eslint/consistent-type-imports": [2, {disallowTypeAnnotations: false}],
|
||||
"@typescript-eslint/no-unnecessary-condition": [2],
|
||||
// "@typescript-eslint/no-unnecessary-condition": [2],
|
||||
|
||||
/**
|
||||
* Enforced rules
|
||||
|
|
|
|||
15
packages/html-reporter/.eslintrc.cjs
Normal file
15
packages/html-reporter/.eslintrc.cjs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
extends: '../.eslintrc.js',
|
||||
parserOptions: {
|
||||
project: path.join(__dirname, 'tsconfig.json'),
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', './playwright/*'],
|
||||
// Disable Typescript specific rules, which requires a special config
|
||||
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||
},
|
||||
],
|
||||
};
|
||||
Loading…
Reference in a new issue