-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Experiment] Convert to Stylelint V16 (#28)
- Loading branch information
Showing
14 changed files
with
2,943 additions
and
1,565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; | ||
export default { extends: ['@commitlint/config-conventional'] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module.exports = { | ||
preset: 'jest-preset-stylelint', | ||
export default { | ||
clearMocks: true, | ||
preset: 'jest-preset-stylelint', | ||
roots: ['src'], | ||
runner: 'jest-light-runner', | ||
setupFiles: ['./jest.setup.js'], | ||
testEnvironment: 'node', | ||
roots: ['src'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const useDefensiveCSS = require('./rules/use-defensive-css'); | ||
import useDefensiveCSS from './rules/use-defensive-css/index.js'; | ||
|
||
module.exports = [useDefensiveCSS]; | ||
export default [useDefensiveCSS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
const expression = /var\(.+?\)/g; | ||
|
||
function findCustomProperties(value) { | ||
export function findCustomProperties(value) { | ||
if (!value) return false; | ||
|
||
let propertiesFound = [...value.trim().matchAll(expression)]; | ||
return propertiesFound | ||
.map(([property]) => (property.includes(',') ? undefined : property)) | ||
.filter((value) => value); | ||
} | ||
|
||
module.exports = { | ||
findCustomProperties, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
const expression = /\b(repeat|repeat-x|repeat-y|space|round|no-repeat|)\b/g; | ||
|
||
function findShorthandBackgroundRepeat(value) { | ||
export function findShorthandBackgroundRepeat(value) { | ||
return value.match(expression).some((val) => val); | ||
} | ||
|
||
module.exports = { | ||
findShorthandBackgroundRepeat, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
const expression = /-\b(moz|ms|o|webkit)\b-/g; | ||
|
||
function findVendorPrefixes(selector) { | ||
export function findVendorPrefixes(selector) { | ||
if (!selector) return false; | ||
|
||
let prefixesFound = [...selector.trim().matchAll(expression)]; | ||
return prefixesFound.length > 1; | ||
} | ||
|
||
module.exports = { | ||
findVendorPrefixes, | ||
}; |