Skip to content

Commit 78e3960

Browse files
Merge pull request #10 from theAshbringer/chores/prettier
Add and configure prettier
2 parents 510bcbd + 1f1eed5 commit 78e3960

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

.eslintrc.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
'plugin:i18next/recommended',
1414
'plugin:storybook/recommended',
1515
'plugin:react-hooks/recommended',
16+
'prettier',
1617
],
1718
overrides: [
1819
{
@@ -46,11 +47,7 @@ module.exports = {
4647
parserOptions: {
4748
ecmaVersion: 'latest',
4849
},
49-
plugins: [
50-
'react',
51-
'@typescript-eslint',
52-
'i18next',
53-
],
50+
plugins: ['react', '@typescript-eslint', 'i18next'],
5451
rules: {
5552
'linebreak-style': 'off',
5653
'import/prefer-default-export': 'off',
@@ -62,7 +59,10 @@ module.exports = {
6259
'no-shadow': 'off',
6360
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
6461
'react/function-component-definition': 'off',
65-
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.tsx'] }],
62+
'react/jsx-filename-extension': [
63+
2,
64+
{ extensions: ['.js', '.jsx', '.tsx'] },
65+
],
6666
'react/react-in-jsx-scope': 'off',
6767
'react/require-default-props': 'off',
6868
'react/jsx-props-no-spreading': 'off',

.vscode/settings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
// "eslint.format.enable": true,
88
"editor.codeActionsOnSave": {
99
"source.fixAll.eslint": "explicit",
10-
"source.fixAll.stylelint": "explicit"
10+
"source.fixAll.stylelint": "explicit",
11+
"source.fixAll.prettier": "explicit",
1112
},
1213
"eslint.validate": ["javascript"],
1314
"css.validate": false,
1415
"less.validate": false,
1516
"scss.validate": false,
1617
"editor.formatOnSave": true,
17-
"jest.jestCommandLine": "npm run test:unit --"
18+
"jest.jestCommandLine": "npm run test:unit --",
19+
"prettier.configPath": ".prettierrc",
1820
}

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"css-loader": "^6.6.0",
5656
"eslint": "^8.24.0",
5757
"eslint-config-airbnb": "^19.0.4",
58+
"eslint-config-prettier": "^10.1.8",
5859
"eslint-plugin-i18next": "^6.0.0-2",
5960
"eslint-plugin-import": "^2.26.0",
6061
"eslint-plugin-react": "^7.31.8",

0 commit comments

Comments
 (0)