https://github.com/communitysolidserver/eslint-config-base
Defaults for ESLint
https://github.com/communitysolidserver/eslint-config-base
Last synced: about 1 year ago
JSON representation
Defaults for ESLint
- Host: GitHub
- URL: https://github.com/communitysolidserver/eslint-config-base
- Owner: CommunitySolidServer
- License: mit
- Created: 2020-12-20T12:33:45.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T09:29:20.000Z (over 2 years ago)
- Last Synced: 2025-03-16T08:18:23.100Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 169 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Solid ESLint base configuration
[](https://www.npmjs.com/package/@solid/eslint-config-base)
Solid defaults for eslinting.
## Install
1. Install package and its peer-dependencies
```bash
npm install --save-dev @solid/eslint-config-base
npx install-peerdeps -D @solid/eslint-config-base
```
2. Extend `@solid/eslint-config-base` from `.eslintrc.js`
```bash
printf 'module.exports = {\n extends: [ "@solid/eslint-config-base" ]\n};\n' > .eslintrc.js
```
## Linting TypeScript
### Requirements
TypeScript configuration files need to match the `./**/tsconfig.*json` glob pattern adopted
by Solid's ESLint base configuration.
All TypeScript files must be included in a `tsconfig`.
### A common error
A common error is missing a `tsconfig` for tests.
```bash
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config:
The file must be included in at least one of the projects provided.
```
To fix it, extend `tsconfig.json` from a `tsconfig.test.json` that includes the `test` folder.
```bash
printf '{\n "extends": "./tsconfig.json",\n "include": [ "test" ]\n}\n' > tsconfig.test.json
```