Strict Check

eslint-config-sc-ts#

This package sets some rules based on the shared config of below packages.

Usage#

Installation#

1$ npm i -D eslint-config-sc-ts

Setup#

1// eslint.config.mjs
2import eslintConfigSCTs from "eslint-config-sc-ts"
3
4return [
5  eslintConfigSCTs.configs.recommended,
6  {
7    languageOptions: {
8      parserOptions: {
9        project: "/path/to/tsconfig.json", // default, refer <root>/tsconfig.json
10      },
11    },
12  },
13].flat()

Equally

1// eslint.config.mjs
2import eslintConfigSCTs from "eslint-config-sc-ts"
3
4return [
5  eslintConfigSCTs.configs.initialRecord,
6  eslintConfigSCTs.configs.stylisticRecord,
7  eslintConfigSCTs.configs.eslintRecommendedRecord,
8  eslintConfigSCTs.configs.unicornRecommendedRecords,
9  eslintConfigSCTs.configs.typescriptEslintStrictTypeCheckedRecords,
10  eslintConfigSCTs.configs.typescriptEslintStylisticTypeCheckedRecords,
11
12  // This use eslint-config-airbnb-base
13  // For react project, this replace to eslint-config-airbnb
14  eslintConfigSCTs.configs.airbnbBaseRecords,
15
16  // This is the custom config of eslint-config-sc-js / eslint-config-sc-ts
17  eslintConfigSCTs.configs.scJsCustomRecord,
18  eslintConfigSCTs.configs.customRecord,
19
20  // This is the reset config for stylistic
21  eslintConfigSCTs.configs.resetRecordForStylistic,
22  {
23    languageOptions: {
24      parserOptions: {
25        project: "/path/to/tsconfig.json", // default, refer <root>/tsconfig.json
26      },
27    },
28  },
29].flat()