Skip to content

Commit 3c71b8c

Browse files
authored
update ESLint (#636)
* update ESLint * f * f * f * c * f * f * f * f * r * u * f * f * u
1 parent 27ba1bd commit 3c71b8c

File tree

70 files changed

+1865
-1214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1865
-1214
lines changed

.changeset/itchy-insects-vanish.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@status-im/eslint-config': patch
3+
'@status-im/components': patch
4+
'@status-im/js': patch
5+
'@status-im/colors': patch
6+
'connector': patch
7+
'@status-im/icons': patch
8+
---
9+
10+
update ESLint

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"typescript.tsdk": "node_modules/typescript/lib",
33
"npm.packageManager": "pnpm",
4+
"eslint.useESLintClass": true,
45
"eslint.workingDirectories": [
6+
"./packages/colors",
7+
"./packages/icons",
8+
"./packages/components",
9+
"./packages/status-js",
10+
"./apps/connector",
511
{
612
"mode": "auto",
713
"#comment": "See https://github.com/microsoft/vscode-eslint/issues/1161 for reason (i.e. multiple .eslintrc config files)"

apps/connector/.eslintrc.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

apps/connector/Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ pipeline {
6262
expression { changesDetected }
6363
}
6464
steps {
65-
dir("${env.WORKSPACE}/apps/connector") {
65+
dir("${env.WORKSPACE}") {
6666
script {
6767
nix.shell(
68-
'pnpm build:chrome',
68+
'pnpm turbo run build --filter=connector',
6969
pure: false,
7070
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
7171
)

apps/connector/eslint.config.mjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import configs, { tailwindcssConfigs } from '@status-im/eslint-config'
2+
3+
/** @type {import('eslint').Linter.Config[]} */
4+
export default [
5+
...configs,
6+
...tailwindcssConfigs,
7+
{
8+
files: ['*.ts', '*.tsx'],
9+
rules: {
10+
'no-constant-binary-expression': 'error',
11+
'no-restricted-globals': ['error', 'process'],
12+
'jsx-a11y/alt-text': [
13+
1,
14+
{
15+
img: [],
16+
},
17+
],
18+
},
19+
},
20+
{
21+
files: ['*.mjs'],
22+
languageOptions: {
23+
parserOptions: {
24+
ecmaVersion: 'latest',
25+
sourceType: 'module',
26+
},
27+
},
28+
},
29+
{
30+
files: ['*.js'],
31+
languageOptions: {
32+
parserOptions: {
33+
ecmaVersion: 'latest',
34+
},
35+
},
36+
},
37+
]

apps/connector/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
"dev:chrome": "plasmo dev --target=chrome-mv3",
1414
"dev:safari": "plasmo dev --target=safari-mv3",
1515
"dev:firefox": "plasmo dev --target=firefox-mv3",
16+
"build": "pnpm build:chrome",
1617
"build:chrome": "plasmo build --target=chrome-mv3",
1718
"build:firefox": "plasmo build --target=firefox-mv3 --zip",
18-
"lint": "eslint ./src",
19+
"lint": "eslint src",
1920
"format": "prettier --write .",
2021
"package": "plasmo package",
2122
"clean": "rimraf apps build .plasmo node_modules"
@@ -25,7 +26,7 @@
2526
"@plasmohq/storage": "^1.11.0",
2627
"@radix-ui/react-dropdown-menu": "^2.1.1",
2728
"@radix-ui/react-switch": "^1.1.0",
28-
"@status-im/colors": "^0.4.0",
29+
"@status-im/colors": "workspace:*",
2930
"cva": "^1.0.0-beta.1",
3031
"ethers": "^6.13.0",
3132
"plasmo": "0.88.0",
@@ -37,15 +38,14 @@
3738
"devDependencies": {
3839
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
3940
"@parcel/bundler-experimental": "^2.7.0",
40-
"@status-im/eslint-config": "^0.3.0",
41+
"@status-im/eslint-config": "workspace:*",
4142
"@tailwindcss/typography": "^0.5.13",
4243
"@types/chrome": "0.0.258",
4344
"@types/node": "20.11.5",
4445
"@types/react": "18.2.48",
4546
"@types/react-dom": "18.2.18",
4647
"autoprefixer": "^10.4.19",
4748
"husky": "^8.0.3",
48-
"lint-staged": "^13.2.0",
4949
"postcss": "^8.4.38",
5050
"prettier": "3.2.4",
5151
"prettier-plugin-tailwindcss": "^0.6.1",

apps/connector/src/components/status-tag.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const styles = cva({
99
base: 'flex h-6 items-center gap-1 rounded-[20px] border px-2 text-13',
1010
variants: {
1111
status: {
12-
on: 'border-success-/20 bg-success-/10 text-success-60',
13-
off: 'border-danger-/20 bg-danger-/10 text-danger-60',
12+
on: 'border-success-50/20 bg-success-50/10 text-success-60',
13+
off: 'border-danger-50/20 bg-danger-50/10 text-danger-60',
1414
},
1515
},
1616
})

apps/connector/src/contents/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class Provider {
127127
return
128128
}
129129
}
130-
} catch (error) {
130+
} catch {
131131
// we don't reject here because incoming message is not from the proxy
132132
return
133133
}

eslint.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('eslint').Linter.Config[]} */
2+
export default [
3+
{
4+
ignores: [
5+
'**/dist',
6+
'**/node_modules',
7+
'**/protos',
8+
'**/proto',
9+
'**/coverage',
10+
'**/storybook-static',
11+
],
12+
},
13+
]

0 commit comments

Comments
 (0)