1.0.19 • Published 12 months ago
eslint-config-wemade v1.0.19
javascript, typescript, pretter , react, next 에 관련된 eslint rule을 공통으로 관리하고 사용합니다.
Install
npm
npm install -D eslint-config-wemadeyarn
yarn add -D eslint-config-wemadePretter 규칙 적용 방법
package.json 에 아래 코드 추가
"prettier": "eslint-config-wemade/prettierConfig",Eslint 규칙 사용 방법
eslint.config v9 이후
import tsRule from 'eslint-config-wemade/flat/typescript';
import prettierRule from 'eslint-config-wemade/flat/prettier';
import nextRule from 'eslint-config-wemade/flat/next';
export default [...tsRule, ...nextRule, ...prettierRule];eslint.config v9 이후
const tsRule = require('eslint-config-wemade/flat/typescript');
const prettierRule = require('eslint-config-wemade/flat/prettier');
const nextRule = require('eslint-config-wemade/flat/next');
module.exports = [
...tsRule,
...nextRule,
...prettierRule,
{ ignores: ['.next/**/*'] },
];.eslintrc v8.57.1 이전
{
"extends": [
"eslint-config-wemade/typescript",
"eslint-config-wemade/next",
"eslint-config-wemade/prettier"
]
}typescript 설정 안에 javascript도 포함되어 있으므로 따로 추가 안해도 됩니다
Error 해결
1.위와 같이 설정했는데도 eslint가 안될때 eslint 설정에
"root": true추가해서 상위(부모) 폴더의 eslint 설정과 충돌 방지하기
2.아래와 같은 이슈가 보일때
TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')eslint 9.15 버전 이슈로 보임 링크 => 9.14버전으로 낮춰서 해결
1.0.19
12 months ago
1.0.18
12 months ago
1.0.17
12 months ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago