https://gitlab.com/html-validate/eslint-config
Eslint sharable config used by the various HTML-validate packages
https://gitlab.com/html-validate/eslint-config
eslint
Last synced: 10 months ago
JSON representation
Eslint sharable config used by the various HTML-validate packages
- Host: gitlab.com
- URL: https://gitlab.com/html-validate/eslint-config
- Owner: html-validate
- License: mit
- Created: 2019-12-24T18:56:13.363Z (over 6 years ago)
- Default Branch: master
- Last Synced: 2024-11-15T08:21:58.019Z (over 1 year ago)
- Topics: eslint
- Stars: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @html-validate/eslint-config
> HTML-Validate ESLint [shareable](http://eslint.org/docs/developer-guide/shareable-configs.html) config.
## Install
```
npm install --save-dev @html-validate/eslint-config
```
## Usage
In your `.eslintrc.js` file:
```js
require("@html-validate/eslint-config/patch/modern-module-resolution");
module.exports = {
extends: ["@html-validate"],
overrides: [
{
files: "*.ts",
extends: ["@html-validate/typescript"],
},
{
files: "*.spec.[jt]s",
extends: ["@html-validate/jest"],
},
],
};
```
## CLI
To automatically write configuration use:
npx @html-validate/eslint-config --write
To check if configuration is up-to-date use:
npx @html-validate/eslint-config --check
The tool will autodetect support for:
- AngularJS
- Cypress
- Jest
- Protractor
- Typescript
- Vue
Use `--enable-FEATURE` or `--disable-FEATURE` to manually enable or disable.
## Typescript with type information
Use `--enable-typeinfo` (enabled by default) or manually configure with:
```diff
overrides: [
{
files: "*.ts",
- extends: ["@html-validate/typescript"],
+ parserOptions: {
+ tsconfigRootDir: __dirname,
+ project: ["./tsconfig.json"],
+ },
+ extends: ["@html-validate/typescript", "@html-validate/typescript-typeinfo"],
},
],
```