eslint-config-fronttigger
installation
$ npm i --save-dev eslint-config-fronttigger
usage
javascript or typescript
// .eslintrc or .eslintrc.json
{
"root": true,
"extends": ["eslint-config-fronttigger"],
}
react
// .eslintrc or .eslintrc.json
{
"root": true,
"extends": ["eslint-config-fronttigger/react"],
}
package.json
에 다음 스크립트를 추가해주세요.
{
"lint": "eslint './**/*.{js,ts,tsx}'",
"lint:fix": "npm run lint -- --fix"
}
prettier
"eslint-config-fronttigger/prettierrc"
package.json
에 다음 스크립트를 추가해주세요.
{
"prettier": "prettier '**/*.{json,yaml,md}' --check",
"prettier:fix": "prettier '**/*.{json,yaml,md}' --write"
}
stylelint
// .stylelintrc or .stylelintrc.json
{
"root": true,
"extends": ["eslint-config-fronttigger/stylelint"],
}
package.json
에 다음 스크립트를 추가해주세요.
{
"lint:style": "stylelint './**/*.{js,ts,tsx}'",
"lint:style:fix": "stylelint './**/*.{js,ts,tsx}' --fix"
}