@keegan-lillo/eslint-config-typescript v0.10.2
@keegan-lillo/linters
Monorepo of various lint configurations I use for my personal projects.
Choose Your Own Adventure
Prettier
You will need Prettier for both the ESLint and Stylelint configs.
Install Prettier
$ yarn add -D prettierUsing My Config
If you are not using your own Prettier config already, you can use mine. Just
create a new .prettierrc file at the root of your project with the following
content:
"@keegan-lillo/prettier-config"Then install the config:
yarn add -D @keegan-lillo/prettier-configESLint
Install ESLint
$ yarn add -D eslintInstall the Config
There are 3 config packages available:
@keegan-lillo/eslint-config-base- Enforces Prettier format
- Enforces import/property ordering
@keegan-lillo/eslint-config-typescript- Extends
@keegan-lillo/eslint-config-baseandeslint-config-standard-with-typescript
- Extends
@keegan-lillo/eslint-config-typescript-typescript- Extends
@keegan-lillo/eslint-config-typescriptandeslint-config-standard-react
- Extends
yarn add -D @keegan-lillo/eslint-config-typescript-reactUse the Config
Add the following to your .eslintrc.
{
extends: ['@keegan-lillo/typescript-react'],
parserOptions: { project: './tsconfig.eslint.json' },
}parserOptions.project is necessary for most of the Typescript rules. If your
project contains files covered by eslint but not by your tsconfig.json, you
can create another file such as tsconfig.eslint.json and point
parserOptions.project at it instead. Then in this file you can exclude/include
all the files that will be covered by ESLint.
tsconfig.eslint.json
{
"extends": "./tsconfig.json",
"include": ["path/to/all/eslint/files"]
}IMPORTANT! These ESLint configs will auto-patch ESLint to make it less
annoying to install dependencies. You must make sure the config is first in the
extends array. I am using:
@rushstack/eslint-patch
behind the scenes. If you don't want to have my configs first, then you will
need to following
these
instructions.
Stylelint
Stylelint Config for SCSS with some very strict property ordering.
Installation
Install the dependencies
yarn add -D @keegan-lillo/eslint-stylelint-config-scssStylelint
Add the following to your .stylelintrc
{
"extends": ["@keegan-lillo/stylelint-config-scss"]
}4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago