Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 1a073ee

Browse files
committed
chore: change eslint settings
1 parent c47f4f2 commit 1a073ee

File tree

7 files changed

+49
-16
lines changed

7 files changed

+49
-16
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build
2+
/release

.eslintrc.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ module.exports = {
44
node: true,
55
},
66
extends: [
7-
'prettier',
8-
'prettier/@typescript-eslint',
97
'plugin:react/recommended',
108
'plugin:react-hooks/recommended',
119
'plugin:@typescript-eslint/recommended',
10+
'plugin:prettier/recommended',
1211
],
1312
parser: '@typescript-eslint/parser',
1413
parserOptions: {
14+
project: './tsconfig.eslint.json',
1515
sourceType: 'module',
1616
},
1717
plugins: ['@typescript-eslint'],
@@ -24,4 +24,9 @@ module.exports = {
2424
'@typescript-eslint/no-var-requires': 0,
2525
'react/prop-types': 0,
2626
},
27+
settings: {
28+
react: {
29+
version: 'detect',
30+
},
31+
},
2732
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "cross-env NODE_ENV=production webpack",
1313
"release": "run-s build && sh scripts/build.sh",
1414
"prettier": "prettier --write '**/*.{js,jsx,ts,tsx,css,html}'",
15-
"lint": "eslint --ext .ts,.tsx,.js,.jsx",
15+
"lint": "eslint . --ext .ts,.tsx,.js,.jsx",
1616
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
1717
"pub": "np --no-publish --no-release-draft",
1818
"version": "npm run changelog && git add ."
@@ -65,7 +65,8 @@
6565
"css-loader": "^5.0.1",
6666
"dotenv": "^8.2.0",
6767
"eslint": "^7.16.0",
68-
"eslint-config-prettier": "^7.1.0",
68+
"eslint-config-prettier": "^8.3.0",
69+
"eslint-plugin-prettier": "^3.4.0",
6970
"eslint-plugin-react": "^7.20.6",
7071
"eslint-plugin-react-hooks": "^4.1.2",
7172
"file-loader": "^6.2.0",

scripts/webserver.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
process.env.ASSET_PATH = '/'
22

3-
const WebpackDevServer = require('webpack-dev-server'),
4-
webpack = require('webpack'),
5-
config = require('../webpack.config'),
6-
env = require('./env'),
7-
path = require('path')
3+
const WebpackDevServer = require('webpack-dev-server')
4+
const webpack = require('webpack')
5+
const config = require('../webpack.config')
6+
const env = require('./env')
7+
const path = require('path')
88

99
const options = {
1010
notHotReload: ['contentScript'],

src/pages/Background/common/ocr-client.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ export class OcrClient {
9494
})
9595
}
9696

97-
private signPayload(
98-
payload: Record<string, any>,
99-
): { authorization: string; timestamp: number } {
97+
private signPayload(payload: Record<string, any>): {
98+
authorization: string
99+
timestamp: number
100+
} {
100101
const hashedRequestPayload = SHA256(JSON.stringify(payload))
101102
const canonicalRequest = [
102103
this.requestConfig.httpRequestMethod,

tsconfig.eslint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src", ".*.js", "**/*.js"],
4+
"exclude": ["build", "node_modules"]
5+
}

yarn.lock

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3998,10 +3998,17 @@ escape-string-regexp@^4.0.0:
39983998
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
39993999
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
40004000

4001-
eslint-config-prettier@^7.1.0:
4002-
version "7.2.0"
4003-
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9"
4004-
integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==
4001+
eslint-config-prettier@^8.3.0:
4002+
version "8.3.0"
4003+
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
4004+
integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
4005+
4006+
eslint-plugin-prettier@^3.4.0:
4007+
version "3.4.0"
4008+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7"
4009+
integrity sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==
4010+
dependencies:
4011+
prettier-linter-helpers "^1.0.0"
40054012

40064013
eslint-plugin-react-hooks@^4.1.2:
40074014
version "4.2.0"
@@ -4319,6 +4326,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
43194326
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
43204327
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
43214328

4329+
fast-diff@^1.1.2:
4330+
version "1.2.0"
4331+
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
4332+
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
4333+
43224334
fast-glob@^3.1.1, fast-glob@^3.2.4, fast-glob@^3.2.5:
43234335
version "3.2.6"
43244336
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.6.tgz#434dd9529845176ea049acc9343e8282765c6e1a"
@@ -7837,6 +7849,13 @@ prepend-http@^2.0.0:
78377849
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
78387850
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
78397851

7852+
prettier-linter-helpers@^1.0.0:
7853+
version "1.0.0"
7854+
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
7855+
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
7856+
dependencies:
7857+
fast-diff "^1.1.2"
7858+
78407859
prettier@^2.2.1:
78417860
version "2.3.2"
78427861
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"

0 commit comments

Comments
 (0)