0.2.3 • Published 26 days ago
@soltech/eslint-config v0.2.3
The package provides common ESLint configuration for Fluid's projects. It can be extended.
Installation
ESLint
The package contains two configurations:
default
: with JS and TS configuration.svelte
: with specific rules and configurations for Svelte.
The configuration depends on the following packages:
eslint
@typescript-eslint/parser
@typescript-eslint/eslint-plugin
@stylistic/eslint-plugin
eslint-plugin-smarter-tabs
If you're using Svelte configuration you also need:
eslint-plugin-svelte
svelte-eslint-parser
You can add those packages to your project with the following command:
ESLint dependencies 👇
npm install --save-dev eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser @stylistic/eslint-plugin eslint-plugin-smarter-tabs
Svelte dependencies 👇
npm install --save-dev eslint-plugin-svelte svelte-eslint-parser
Stylelint
The package also contains shared Stylelint configuration: stylelint
.
To add it into your project you need to install the main stylelint
package 👇
npm install --save-dev stylelint
Configuration
ESLint
You must add the following configuration to your ESLint file:
{
"extends": [
"@soltech"
]
}
or
{
"extends": [
"@soltech/eslint-config/svelte"
]
}
if you're using Svelte configuration.
Stylelint
To add Stylelint configuration in your project you need to create a .stylelintrc
file in the root of your project with the following content:
module.exports = {
extends: ['@fluid/eslint-config/stylelint']
};