7.3.0 • Published 9 days ago
@lars-reimann/eslint-config v7.3.0
Basic Configuration for ESLint
To use this configuration:
- Run
npm install --save-dev @lars-reimann/eslint-config
. - Create a
tsconfig.json
file. If you already have one, you can skip this step. You can start with a base configuration and then focus on the details that are unique to your project. Here's a possible example:{ "extends": "@tsconfig/node16/tsconfig.json", "include": ["src/**/*"], "exclude": ["node_modules", "**/*.test.ts"] }
- Create an
.eslintrc.js
file with the following content. Replace the path to thetsconfig.json
file. It is also possible to specify multiple projects by passing an array toparserOptions.project
and pointing to thetsconfig.json
of each project:module.exports = { root: true, parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.json', }, extends: '@lars-reimann', };
Common Issues
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
Example error message:
0:0 error Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: vite.config.ts.
The file must be included in at least one of the projects provided
Solution 1:
Ignore the file by adding it to the .eslintignore
file:
vite.config.ts
Solution 2:
Follow the instructions to create a tsconfig.eslint.json
file. Here is an example for such a file:
{
"extends": "./tsconfig.json", // extend the actual tsconfig.json
"compilerOptions": {
"noEmit": true // prevent building with this configuration
},
"include": ["src/**/*", "vite.config.ts"], // include all TypeScript files
"exclude": ["node_modules"] // don't exclude any TypeScript files
}
7.3.0
9 days ago
7.2.0
9 days ago
7.1.0
1 month ago
7.0.0
1 month ago
6.2.0
2 months ago
6.1.0
3 months ago
6.0.1
3 months ago
6.0.0
3 months ago
5.2.1
4 months ago
5.2.0
4 months ago
5.1.5
5 months ago
5.1.4
7 months ago
5.1.3
7 months ago
5.1.2
9 months ago
5.1.1
1 year ago
5.0.2
1 year ago
5.1.0
1 year ago
5.0.1
1 year ago
5.0.0
1 year ago
4.4.2
2 years ago
4.4.1
2 years ago
4.4.0
2 years ago
4.3.1
2 years ago
4.3.0
2 years ago
4.2.0
2 years ago
4.1.2
2 years ago
4.0.4
3 years ago
4.0.3
3 years ago
4.0.2
3 years ago
4.0.1
3 years ago
4.0.0
3 years ago
3.0.4
3 years ago
3.0.3
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.0.0
3 years ago
1.0.0
3 years ago