Skip to content

Commit 158facd

Browse files
committed
eslint: fix prettier config
1 parent dd69652 commit 158facd

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

.eslintrc.js

+7-18
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
const prettier = {
2-
singleQuote: true,
3-
jsxSingleQuote: true,
4-
printWidth: 120,
5-
};
6-
71
/** @type {import('eslint').Linter.Config} */
82
module.exports = {
93
parser: '@typescript-eslint/parser',
@@ -21,20 +15,15 @@ module.exports = {
2115
version: 'detect',
2216
},
2317
linkComponents: [
24-
{name: 'Link', linkAttribute: 'to'},
25-
{name: 'NavLink', linkAttribute: 'to'},
18+
{ name: 'Link', linkAttribute: 'to' },
19+
{ name: 'NavLink', linkAttribute: 'to' },
2620
],
2721
},
2822
env: {
2923
browser: true,
3024
es6: true,
3125
},
32-
plugins: [
33-
'react',
34-
'react-hooks',
35-
'prettier',
36-
'@typescript-eslint',
37-
],
26+
plugins: ['react', 'react-hooks', 'prettier', '@typescript-eslint'],
3827
extends: [
3928
// 'standard',
4029
'eslint:recommended',
@@ -44,7 +33,7 @@ module.exports = {
4433
],
4534
rules: {
4635
eqeqeq: 'error',
47-
'prettier/prettier': ['error', prettier],
36+
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
4837
// TypeScript can infer this significantly better than eslint ever can.
4938
'react/prop-types': 0,
5039
'react/display-name': 0,
@@ -56,7 +45,7 @@ module.exports = {
5645
// @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
5746
'no-use-before-define': 0,
5847
'@typescript-eslint/no-use-before-define': 'warn',
59-
'@typescript-eslint/no-unused-vars': ['warn', {argsIgnorePattern: '^_', varsIgnorePattern: '^_'}],
60-
'@typescript-eslint/ban-ts-comment': ['error', {'ts-expect-error': 'allow-with-description'}],
61-
}
48+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
49+
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
50+
},
6251
};

.prettierrc.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"jsxSingleQuote": true,
8+
"endOfLine": "lf"
9+
}

0 commit comments

Comments
 (0)