Skip to content

Commit

Permalink
feat: update ts, eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
0529bill committed Aug 4, 2022
1 parent 36faf56 commit 92ac45a
Show file tree
Hide file tree
Showing 5 changed files with 710 additions and 21 deletions.
19 changes: 12 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ module.exports = {
es2021: true,
},
extends: ['plugin:react/recommended', 'airbnb'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
parser: '@typescript-eslint/parser',
// parserOptions: {
// ecmaFeatures: {
// jsx: true,
// },
// ecmaVersion: 12,
// sourceType: 'module',
// },
plugins: ['react'],
rules: {
'max-len': ['error', { code: 200 }],
semi: ['error', 'never'],
'no-param-reassign': ['error', { props: false }], // 禁止對參數赋值
'comma-dangle': 'off',
'consistent-return': 'off',
'no-nested-ternary': 'off',
indent: 'off',
},
ignorePatterns: ['dist/*'],
}
3 changes: 1 addition & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"printWidth": 100,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
"tabWidth": 2
}
Loading

0 comments on commit 92ac45a

Please sign in to comment.