@lintest/rules-hanatour
Version:
The integrated lint rules for HanaTour
137 lines (136 loc) • 4.95 kB
JavaScript
module.exports = {
lintRules: {
general: {
'camelcase': [
'error', {
properties: 'never',
ignoreDestructuring: true,
allow: ['^mixin', '^TEMP', '^TEST'],
},
],
'comma-dangle': 'off',
'comma-style': ['error', 'last'],
'generator-star-spacing': [
'error', {
before: false,
after: true,
//anonymous: { before: false, after: true },
//method: { before: false, after: true },
},
],
'indent': 'off', // ['warn', 2, { SwitchCase: 1 }], // === 퍼포먼스 향상을 위해 off 시켜둠 ===
'lines-between-class-members': 'off',
'prefer-const': [
'error', {
destructuring: 'any',
ignoreReadBeforeAssign: false,
},
],
'multiline-ternary': 'off',
'no-console': 'off', // 라이브배포시 빌드오류를 막기 위해 off 한다 (개발완료시점에 console.* 지울것).
'no-debugger': 'off', // 라이브배포시 빌드오류를 막기 위해 off 한다 (개발완료시점에 debugger 지울것).
'no-empty': 'warn',
'no-extend-native': 'off', // primitive type 확장 가능하도록
'no-inner-declarations': 'off',
'no-multi-spaces': 'off',
'no-return-assign': 'off',
'no-undef': 'off', // @typescript-eslint 파서 오류로 임시로 꺼둠
'no-unused-expressions': 'off', // @typescript-eslint/no-unused-expressions 사용
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'padded-blocks': 'off',
'quotes': ['error', 'single'],
'require-await': 'warn', // No async function without await
'semi': 'off',
'spaced-comment': 'off',
'yoda': 'off',
},
import: {
'named': 'off', // WindowsOS 에서 에러발생?
'no-duplicates': 'off', // === 퍼포먼스 향상을 위해 off 시켜둠 ===
'no-mutable-exports': 'off', // nuxt.js에서 mutable하게 export 하는 방식 사용
'order': 'warn',
},
jest: {
'no-commented-out-tests': 'off', // 주석처리된 테스트 경고 무시
'no-try-expect': 'off', // try-catch를 이용한 테스트 가능하도록
'valid-expect': 'off', // promise객체 리턴 메소드 테스트시 async/await 사용
},
lintest: {
// [on/off, all/progress/report, reportMaxFiles, reportLimitDuration(ms), progressInterval]
report: [1, 'all', 10, 300, 80],
},
nuxt: {
'no-cjs-in-config': 'off',
},
promise: {
'no-promise-in-callback': 'off',
'valid-params': 'off',
},
react: {
'display-name': 'off',
'jsx-boolean-value': 'off',
'jsx-wrap-multilines': 'off',
'prop-types': 'off', // prop-types 라이브러리 사용안함, TypeScript 사용
},
reactHooks: {
'rules-of-hooks': 'off',
'exhaustive-deps': 'off',
},
typescript: {
'indent': 'off', // ['error', 2], // === 퍼포먼스 향상을 위해 off 시켜둠 ===
'lines-between-class-members': 'off',
//'no-unnecessary-condition': 'warn', // vue.js에서 computed 메소드 이슈로 사용금지
'no-unused-vars': 'off', // ['warn', { args: 'all', argsIgnorePattern: '^_' }],
'no-use-before-define': ['warn', { functions: false, classes: false }],
'prefer-for-of': 'warn',
'prefer-nullish-coalescing': 'warn', // || 대신 ??를 선호하도록
'prefer-optional-chain': 'warn', // optional chain을 선호하도록
},
unicorn: {
'escape-case': 'error',
'no-array-instanceof': 'error',
'number-literal-case': 'error',
},
vue: {
'attribute-hyphenation': 'off',
'custom-event-name-casing': 'off',
'html-closing-bracket-spacing': 'off',
'html-indent': 'off', // ['error', 2], // === 퍼포먼스 향상을 위해 off 시켜둠 ===
'html-self-closing': 'off',
'max-attributes-per-line': 'off',
'multi-word-component-names': 'off',
'multiline-html-element-content-newline': 'off',
'no-parsing-error': [
'error', {
'control-character-in-input-stream': false,
'x-invalid-end-tag': false,
},
],
'no-unused-vars': 'warn',
'no-v-html': 'off',
'require-default-prop': 'off',
'require-prop-types': 'off',
'singleline-html-element-content': 'off',
'singleline-html-element-content-newline': 'off',
},
node: {
'no-callback-literal': 'off',
},
},
/* .prettierrc 파일 사용시 */
prettier: '.prettierrc',
/* 일괄 파일에 대한 prettier 적용 필요시 */
//prettier: {
// arrowParens: 'avoid', // 'always'
// bracketSpacing: true,
// endOfLine: 'auto', // 'lf'
// jsxBracketSameLine: false,
// jsxSingleQuote: false,
// printWidth: 120,
// tabWidth: 2,
// useTabs: false,
// semi: false,
// singleQuote: true,
//},
}