Skip to content

Commit

Permalink
feat(code): update linters (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
happylolonly authored Jul 3, 2024
1 parent ab7997c commit 6bd4bf1
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-standard-scss"],
// "plugins": ["stylelint-order"],
"extends": ["stylelint-config-standard-scss"],
"plugins": ["stylelint-scss"],
"rules": {
"selector-class-pattern": "^[a-z][\\w\\d]*((__[\\w\\d]+)?(--[a-z][\\w\\d]+)?|(--[a-z][\\w\\d]+(__[\\w\\d]+)?))$"
"selector-class-pattern": "^[a-z][\\w\\d]*((__[\\w\\d]+)?(--[a-z][\\w\\d]+)?|(--[a-z][\\w\\d]+(__[\\w\\d]+)?))$",
"media-feature-range-notation": "context",
"scss/dollar-variable-pattern": null
}
}
17 changes: 16 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,20 @@
"stylelint",
"superintelligence",
"websockets"
]
],
"eslint.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.snippet": ["css", "scss", "postcss"],
"stylelint.validate": ["css", "scss", "postcss"]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@
"stream-http": "^3.2.0",
"style-loader": "^3.3.1",
"stylelint": "^15.6.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-config-clean-order": "^5.2.0",
"stylelint-config-standard-scss": "^9.0.0",
"stylelint-order": "^6.0.3",
"stylelint-scss": "^5.3.1",
"swr": "^1.0.1",
"terser-webpack-plugin": "4.2.3",
"ts-migrate": "^0.1.35",
Expand Down
2 changes: 2 additions & 0 deletions src/style/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable custom-property-empty-line-before */
@import url('./libs/index.scss');

:root {
Expand Down Expand Up @@ -33,6 +34,7 @@
--text-opacity-4: 0.38;
}

/* stylelint-disable */
:export {
primaryColor: var(--primary-color);
greenLightColor: var(--green-light);
Expand Down
25 changes: 24 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22583,6 +22583,11 @@ known-css-properties@^0.27.0:
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.27.0.tgz#82a9358dda5fe7f7bd12b5e7142c0a205393c0c5"
integrity sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==

known-css-properties@^0.29.0:
version "0.29.0"
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.29.0.tgz#e8ba024fb03886f23cb882e806929f32d814158f"
integrity sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==

kubo-rpc-client@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/kubo-rpc-client/-/kubo-rpc-client-3.0.1.tgz#61e4c64ccab6bf1bb6147dc8c45a423b95638fa7"
Expand Down Expand Up @@ -30192,6 +30197,13 @@ stylehacks@^5.1.1:
browserslist "^4.21.4"
postcss-selector-parser "^6.0.4"

stylelint-config-clean-order@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/stylelint-config-clean-order/-/stylelint-config-clean-order-5.2.0.tgz#4462256111740d1e777515bf24d3b9805ed05e12"
integrity sha512-eAB9ftPa8txPFY2oh4NIE3DFkNzqVEBIALUZhSXP0+6CISPjZPBoOV24shjC9DgOKr7rNPY52DAXBXIBI//Mhg==
dependencies:
stylelint-order "^6.0.2"

stylelint-config-recommended-scss@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz#7b933ecac99cd3b52d14d1746e3ecd36f421b4b6"
Expand Down Expand Up @@ -30221,7 +30233,7 @@ stylelint-config-standard@^33.0.0:
dependencies:
stylelint-config-recommended "^12.0.0"

stylelint-order@^6.0.3:
stylelint-order@^6.0.2, stylelint-order@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/stylelint-order/-/stylelint-order-6.0.3.tgz#160b78650bd90463241b992581efee7159baefc2"
integrity sha512-1j1lOb4EU/6w49qZeT2SQVJXm0Ht+Qnq9GMfUa3pMwoyojIWfuA+JUDmoR97Bht1RLn4ei0xtLGy87M7d29B1w==
Expand All @@ -30239,6 +30251,17 @@ stylelint-scss@^4.6.0:
postcss-selector-parser "^6.0.11"
postcss-value-parser "^4.2.0"

stylelint-scss@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-5.3.1.tgz#7f0f5f06d0a2a3c515aa71d3a8de3548045e03e1"
integrity sha512-5I9ZDIm77BZrjOccma5WyW2nJEKjXDd4Ca8Kk+oBapSO4pewSlno3n+OyimcyVJJujQZkBN2D+xuMkIamSc6hA==
dependencies:
known-css-properties "^0.29.0"
postcss-media-query-parser "^0.2.3"
postcss-resolve-nested-selector "^0.1.1"
postcss-selector-parser "^6.0.13"
postcss-value-parser "^4.2.0"

stylelint@^15.6.0:
version "15.10.1"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-15.10.1.tgz#93f189958687e330c106b010cbec0c41dcae506d"
Expand Down

0 comments on commit 6bd4bf1

Please sign in to comment.