Skip to content

Commit

Permalink
Prepare files for stylelint rules 🗂️
Browse files Browse the repository at this point in the history
  • Loading branch information
01taylop committed Aug 4, 2024
1 parent d7d2998 commit 8ec48df
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 113 deletions.
28 changes: 28 additions & 0 deletions config/stylelint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Rules from './stylelint/rules'

export default () => ({
extends: [
'stylelint-config-property-sort-order-smacss',
],
overrides: [{
files: ['**/*.scss'], // TODO: Extend and make dry
rules: {
'at-rule-no-unknown': null, // scss/at-rule-no-unknown
'function-no-unknown': null, // scss/function-no-unknown
'property-no-unknown': null, // scss/property-no-unknown
...Rules.DeclarationStrictValue,
...Rules.SCSS,
},
}],
plugins: [
'@stylistic/stylelint-plugin',
'stylelint-declaration-strict-value',
'stylelint-order',
'stylelint-scss',
],
rules: {
...Rules.Order,
...Rules.Stylelint,
...Rules.Stylistic,
},
})
3 changes: 3 additions & 0 deletions config/stylelint/rules/declaration-strict-value.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// https://github.com/AndyOGo/stylelint-declaration-strict-value

export default {}
15 changes: 15 additions & 0 deletions config/stylelint/rules/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import DeclarationStrictValue from './declaration-strict-value'
import Order from './order'
import SCSS from './scss'
import Stylelint from './stylelint'
import Stylistic from './stylistic'

const Rules = {
DeclarationStrictValue,
Order,
SCSS,
Stylelint,
Stylistic,
}

export default Rules
3 changes: 3 additions & 0 deletions config/stylelint/rules/order.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// https://github.com/hudochenkov/stylelint-order/tree/master

export default {}
3 changes: 3 additions & 0 deletions config/stylelint/rules/scss.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// https://github.com/stylelint-scss/stylelint-scss

export default {}
3 changes: 3 additions & 0 deletions config/stylelint/rules/stylelint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// https://stylelint.io/user-guide/rules

export default {}
3 changes: 3 additions & 0 deletions config/stylelint/rules/stylistic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// https://github.com/stylelint-stylistic/stylelint-stylistic

export default {}
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
"markdownlint-rule-helpers": "0.25.0",
"node-notifier": "10.0.1",
"space-log": "1.2.0",
"stylelint": "16.6.1",
"stylelint": "16.8.1",
"stylelint-config-property-sort-order-smacss": "10.0.0",
"stylelint-config-standard-scss": "13.1.0",
"stylelint-declaration-strict-value": "1.10.6",
"stylelint-order": "6.0.4",
"stylelint-scss": "6.4.1"
Expand Down Expand Up @@ -85,7 +84,6 @@
"markdownlint",
"stylelint",
"stylelint-config-property-sort-order-smacss",
"stylelint-config-standard-scss",
"stylelint-declaration-strict-value",
"stylelint-order",
"stylelint-scss"
Expand Down
112 changes: 2 additions & 110 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1033,31 +1033,16 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@csstools/css-parser-algorithms@^2.6.3":
version "2.6.3"
resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.6.3.tgz#b5e7eb2bd2a42e968ef61484f1490a8a4148a8eb"
integrity sha512-xI/tL2zxzEbESvnSxwFgwvy5HS00oCXxL4MLs6HUiDcYfwowsoQaABKxUElp1ARITrINzBnsECOc1q0eg2GOrA==

"@csstools/css-parser-algorithms@^2.7.1":
version "2.7.1"
resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz#6d93a8f7d8aeb7cd9ed0868f946e46f021b6aa70"
integrity sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==

"@csstools/css-tokenizer@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.3.1.tgz#3d47e101ad48d815a4bdce8159fb5764f087f17a"
integrity sha512-iMNHTyxLbBlWIfGtabT157LH9DUx9X8+Y3oymFEuMj8HNc+rpE3dPFGFgHjpKfjeFDjLjYIAIhXPGvS2lKxL9g==

"@csstools/css-tokenizer@^2.4.1":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz#1d8b2e200197cf5f35ceb07ca2dade31f3a00ae8"
integrity sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==

"@csstools/media-query-list-parser@^2.1.11":
version "2.1.11"
resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.11.tgz#465aa42f268599729350e305e1ae14a30c1daf51"
integrity sha512-uox5MVhvNHqitPP+SynrB1o8oPxPMt2JLgp5ghJOWf54WGQ5OKu47efne49r1SWqs3wRP8xSWjnO9MBKxhB1dA==

"@csstools/media-query-list-parser@^2.1.13":
version "2.1.13"
resolved "https://registry.yarnpkg.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.13.tgz#f00be93f6bede07c14ddf51a168ad2748e4fe9e5"
Expand Down Expand Up @@ -3701,11 +3686,6 @@ kleur@^3.0.3:
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==

known-css-properties@^0.31.0:
version "0.31.0"
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.31.0.tgz#5c8d9d8777b3ca09482b2397f6a241e5d69a1023"
integrity sha512-sBPIUGTNF0czz0mwGGUoKKJC8Q7On1GPbCSFPfyEsfHb2DyBG0Y4QtV+EVWpINSaiGKZblDNuF5AezxSgOhesQ==

known-css-properties@^0.34.0:
version "0.34.0"
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.34.0.tgz#ccd7e9f4388302231b3f174a8b1d5b1f7b576cea"
Expand Down Expand Up @@ -4163,11 +4143,6 @@ postcss-safe-parser@^7.0.0:
resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz#6273d4e5149e286db5a45bc6cf6eafcad464014a"
integrity sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==

postcss-scss@^4.0.9:
version "4.0.9"
resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.9.tgz#a03c773cd4c9623cb04ce142a52afcec74806685"
integrity sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==

postcss-selector-parser@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz#49694cb4e7c649299fea510a29fa6577104bcf53"
Expand Down Expand Up @@ -4203,15 +4178,6 @@ postcss@^8.4.32, postcss@^8.4.40:
picocolors "^1.0.1"
source-map-js "^1.2.0"

postcss@^8.4.38:
version "8.4.38"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e"
integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.0"
source-map-js "^1.2.0"

prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
Expand Down Expand Up @@ -4618,35 +4584,6 @@ [email protected]:
css-property-sort-order-smacss "~2.2.0"
stylelint-order "^6.0.4"

stylelint-config-recommended-scss@^14.0.0:
version "14.1.0"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz#1a5855655cddcb5f77c10f38c76567adf2bb9aa3"
integrity sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==
dependencies:
postcss-scss "^4.0.9"
stylelint-config-recommended "^14.0.1"
stylelint-scss "^6.4.0"

stylelint-config-recommended@^14.0.1:
version "14.0.1"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz#d25e86409aaf79ee6c6085c2c14b33c7e23c90c6"
integrity sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==

[email protected]:
version "13.1.0"
resolved "https://registry.yarnpkg.com/stylelint-config-standard-scss/-/stylelint-config-standard-scss-13.1.0.tgz#2be36ca13087325a42c1f26df8267808667cc886"
integrity sha512-Eo5w7/XvwGHWkeGLtdm2FZLOMYoZl1omP2/jgFCXyl2x5yNz7/8vv4Tj6slHvMSSUNTaGoam/GAZ0ZhukvalfA==
dependencies:
stylelint-config-recommended-scss "^14.0.0"
stylelint-config-standard "^36.0.0"

stylelint-config-standard@^36.0.0:
version "36.0.1"
resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz#727cbb2a1ef3e210f5ce8329cde531129f156609"
integrity sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==
dependencies:
stylelint-config-recommended "^14.0.1"

[email protected]:
version "1.10.6"
resolved "https://registry.yarnpkg.com/stylelint-declaration-strict-value/-/stylelint-declaration-strict-value-1.10.6.tgz#7eb5ffc73cedc03057685c005ebed69911be71fa"
Expand All @@ -4660,7 +4597,7 @@ [email protected], stylelint-order@^6.0.4:
postcss "^8.4.32"
postcss-sorting "^8.0.2"

[email protected], stylelint-scss@^6.4.0:
[email protected]:
version "6.4.1"
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-6.4.1.tgz#78a197bbcdf9a61b7365769a9a42dddc722a24c5"
integrity sha512-+clI2bQC2FPOt06ZwUlXZZ95IO2C5bKTP0GLN1LNQPVvISfSNcgMKv/VTwym1mK9vnqhHbOk8lO4rj4nY7L9pw==
Expand All @@ -4671,52 +4608,7 @@ [email protected], stylelint-scss@^6.4.0:
postcss-selector-parser "^6.1.0"
postcss-value-parser "^4.2.0"

[email protected]:
version "16.6.1"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.6.1.tgz#84735aca2bb5cde535572b7a9b878d2ec983a570"
integrity sha512-yNgz2PqWLkhH2hw6X9AweV9YvoafbAD5ZsFdKN9BvSDVwGvPh+AUIrn7lYwy1S7IHmtFin75LLfX1m0D2tHu8Q==
dependencies:
"@csstools/css-parser-algorithms" "^2.6.3"
"@csstools/css-tokenizer" "^2.3.1"
"@csstools/media-query-list-parser" "^2.1.11"
"@csstools/selector-specificity" "^3.1.1"
"@dual-bundle/import-meta-resolve" "^4.1.0"
balanced-match "^2.0.0"
colord "^2.9.3"
cosmiconfig "^9.0.0"
css-functions-list "^3.2.2"
css-tree "^2.3.1"
debug "^4.3.4"
fast-glob "^3.3.2"
fastest-levenshtein "^1.0.16"
file-entry-cache "^9.0.0"
global-modules "^2.0.0"
globby "^11.1.0"
globjoin "^0.1.4"
html-tags "^3.3.1"
ignore "^5.3.1"
imurmurhash "^0.1.4"
is-plain-object "^5.0.0"
known-css-properties "^0.31.0"
mathml-tag-names "^2.1.3"
meow "^13.2.0"
micromatch "^4.0.7"
normalize-path "^3.0.0"
picocolors "^1.0.1"
postcss "^8.4.38"
postcss-resolve-nested-selector "^0.1.1"
postcss-safe-parser "^7.0.0"
postcss-selector-parser "^6.1.0"
postcss-value-parser "^4.2.0"
resolve-from "^5.0.0"
string-width "^4.2.3"
strip-ansi "^7.1.0"
supports-hyperlinks "^3.0.0"
svg-tags "^1.0.0"
table "^6.8.2"
write-file-atomic "^5.0.1"

stylelint@^16.8.0:
[email protected], stylelint@^16.8.0:
version "16.8.1"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.8.1.tgz#7d4b2d7922771dd0514446a66f04e954f1dfa444"
integrity sha512-O8aDyfdODSDNz/B3gW2HQ+8kv8pfhSu7ZR7xskQ93+vI6FhKKGUJMQ03Ydu+w3OvXXE0/u4hWU4hCPNOyld+OA==
Expand Down

0 comments on commit 8ec48df

Please sign in to comment.