Menu
eslint-config-sc-react#
This package sets some rules based on the shared config of below packages.
It is to possible to for typescript project, then use eslint-config-sc-ts.
Usage#
Installation#
1$ npm i -D eslint-config-sc-react
Setup#
For Javascript project
1// eslint.config.mjs
2import eslintConfigSCReact from "eslint-config-sc-react"
3
4return [
5 ...eslintConfigSCReact.configs.recommended,
6]
Equally
1// eslint.config.mjs
2import eslintConfigSCReact from "eslint-config-sc-react"
3
4return [
5 eslintConfigSCReact.configs.initialRecord,
6 eslintConfigSCReact.configs.stylisticRecord,
7 eslintConfigSCReact.configs.eslintRecommendedRecord,
8 eslintConfigSCReact.configs.unicornRecommendedRecords,
9 eslintConfigSCReact.configs.reactRecords,
10 eslintConfigSCReact.configs.airbnbRecords,
11
12 // This is the custom config of eslint-config-sc-js / eslint-config-sc-react
13 eslintConfigSCReact.configs.scJsCustomRecord,
14 eslintConfigSCReact.configs.customRecord,
15
16 // This is the reset config for stylistic
17 eslintConfigSCReact.configs.resetRecordForStylistic,
18].flat()
For Typescript project
1// eslint.config.mjs
2import eslintConfigSCTs from "eslint-config-sc-ts"
3import eslintConfigSCReact from "eslint-config-sc-react"
4
5return [
6 eslintConfigSCReact.configs.initialRecord,
7 eslintConfigSCReact.configs.stylisticRecord,
8 eslintConfigSCReact.configs.eslintRecommendedRecord,
9 eslintConfigSCReact.configs.unicornRecommendedRecords,
10 eslintConfigSCTs.configs.typescriptEslintStrictTypeCheckedRecords,
11 eslintConfigSCTs.configs.typescriptEslintStylisticTypeCheckedRecords,
12 eslintConfigSCReact.configs.reactRecords,
13 eslintConfigSCReact.configs.airbnbRecords,
14
15 // This is the custom config of eslint-config-sc-js / eslint-config-sc-react
16 eslintConfigSCReact.configs.scJsCustomRecord,
17 eslintConfigSCReact.configs.customRecord,
18 eslintConfigSCReact.configs.customRecordWithTypescript,
19
20 // This is the reset config for stylistic
21 eslintConfigSCReact.configs.resetRecordForStylistic,
22].flat()