Skip to content

Commit

Permalink
ci(eslint): fix eslint configured to ignore src/lib/
Browse files Browse the repository at this point in the history
Well this sucks! We've not been linting the vast majority of the actual code of the library due to a
misconfigured `.eslintignore`. Mass-fix coming.
  • Loading branch information
tulup-conner committed Feb 20, 2023
1 parent dffb998 commit da60e4c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 35 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,42 @@
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"eslintConfig": {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:storybook/recommended"
],
"ignorePatterns": [
"/build",
"/docs",
"/lib",
"commitlint.config.js",
"config-overrides.js",
"lint-staged.js",
"postcss.config.js",
"tailwind.config.js"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"project": [
"tsconfig.json",
"cypress/tsconfig.json"
]
},
"plugins": [
"@typescript-eslint",
"react-hooks",
"storybook"
],
"root": true,
"rules": {
"@typescript-eslint/consistent-type-imports": "warn"
}
}
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "ESNext",
"moduleResolution": "node",
"noEmit": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
Expand All @@ -17,5 +18,7 @@
"strict": true,
"target": "ESNext",
"types": ["@testing-library/jest-dom", "node", "vitest"]
}
},
"exclude": ["/build", "/lib"],
"include": ["**/*.js", "**/*.ts", "**/*.tsx"]
}

0 comments on commit da60e4c

Please sign in to comment.