Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit 3fc35af

Browse files
committed
build: unify linting tools
1 parent b199055 commit 3fc35af

10 files changed

+1273
-2751
lines changed

.eslintignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/coverage
2+
/node_modules
3+
/build
4+
/dist
5+
/src/core/bin/serviceWorker.js
6+
/src/core/scripts/use-typescript.js

.eslintrc.js

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
module.exports = {
2-
extends: ['eslint:recommended', 'plugin:react/recommended'],
3-
parser: 'babel-eslint',
2+
extends: [
3+
'plugin:react/recommended',
4+
'plugin:react-hooks/recommended',
5+
'plugin:prettier/recommended',
6+
],
7+
env: {
8+
es2021: true,
9+
node: true,
10+
browser: true,
11+
},
412
parserOptions: {
5-
ecmaVersion: 2020,
13+
ecmaVersion: 12,
614
sourceType: 'module',
715
ecmaFeatures: {
816
jsx: true,
917
},
1018
},
11-
env: {
12-
browser: true,
13-
es6: true,
14-
jest: true,
15-
node: true,
16-
},
1719
rules: {
18-
'no-console': 'off',
20+
'no-unused-vars': ['warn', { args: 'none', argsIgnorePattern: 'req|res|next|val' }],
21+
'prettier/prettier': ['error'],
1922
},
2023
settings: {
2124
react: {

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/coverage
2+
/node_modules
3+
/build
4+
/dist
5+
/src/core/bin/serviceWorker.js
6+
/src/core/scripts/use-typescript.js

.prettierrc

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
2-
"jsxBracketSameLine": true,
3-
"printWidth": 80,
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
46
"singleQuote": true,
5-
"trailingComma": "all"
7+
"quoteProps": "as-needed",
8+
"trailingComma": "all",
9+
"bracketSpacing": true,
10+
"arrowParens": "always",
11+
"endOfLine": "lf"
612
}

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ import React, { Component } from 'react';
110110

111111
class Widget extends Component {
112112
render() {
113-
return (
114-
<div className="App">
115-
{this.props.obj.getAttribute('data-button-text')}
116-
</div>
117-
);
113+
return <div className="App">{this.props.obj.getAttribute('data-button-text')}</div>;
118114
}
119115
}
120116

0 commit comments

Comments
 (0)