7.5.0 • Published 1 year ago
@lars-reimann/eslint-config v7.5.0
Basic Configuration for ESLint
To use this configuration:
- Run
npm install --save-dev @lars-reimann/eslint-config. - Create a
tsconfig.jsonfile. 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.jsfile with the following content. Replace the path to thetsconfig.jsonfile. It is also possible to specify multiple projects by passing an array toparserOptions.projectand pointing to thetsconfig.jsonof 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 providedSolution 1:
Ignore the file by adding it to the .eslintignore file:
vite.config.tsSolution 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.5.0
1 year ago
7.4.0
1 year ago
7.4.1
1 year ago
7.3.0
1 year ago
7.2.0
1 year ago
7.1.0
2 years ago
7.0.0
2 years ago
6.2.0
2 years ago
6.1.0
2 years ago
6.0.1
2 years ago
6.0.0
2 years ago
5.2.1
2 years ago
5.2.0
2 years ago
5.1.5
2 years ago
5.1.4
2 years ago
5.1.3
2 years ago
5.1.2
2 years ago
5.1.1
3 years ago
5.0.2
3 years ago
5.1.0
3 years ago
5.0.1
3 years ago
5.0.0
3 years ago
4.4.2
3 years ago
4.4.1
3 years ago
4.4.0
3 years ago
4.3.1
3 years ago
4.3.0
3 years ago
4.2.0
3 years ago
4.1.2
4 years ago
4.0.4
4 years ago
4.0.3
4 years ago
4.0.2
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.0.4
4 years ago
3.0.3
4 years ago
3.0.2
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.0.0
4 years ago
1.0.0
4 years ago