-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('stylelint').Config} */ | ||
module.exports = { | ||
customSyntax: require('postcss-less'), | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import less from 'postcss-less'; | ||
|
||
/** @type {import('stylelint').Config} */ | ||
const config = { | ||
customSyntax: less, | ||
extends: ['stylelint-config-standard'], | ||
rules: { | ||
'alpha-value-notation': 'number', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.html'], | ||
extends: ['stylelint-config-html/html.js', 'stylelint-config-standard'], | ||
}, | ||
], | ||
}; | ||
|
||
export default config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('stylelint').Config} */ | ||
const myExtendableConfig = { | ||
plugins: ['stylelint-order'], | ||
}; | ||
|
||
module.exports = myExtendableConfig; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "@fixtures/stylelint2", | ||
"version": "*", | ||
"devDependencies": { | ||
"postcss-less": "*", | ||
"postcss-styl": "*", | ||
"stylelint": "*", | ||
"stylelint-config-recommended": "*", | ||
"stylelint-config-standard": "*" | ||
}, | ||
"dependencies": { | ||
"stylelint-config-html": "*" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const less = require('postcss-less'); | ||
const stylus = require('postcss-styl'); | ||
|
||
/** @type {import('stylelint').Config} */ | ||
const config = { | ||
customSyntax: less, | ||
extends: [require.resolve('stylelint-config-recommended'), './myExtendableConfig'], | ||
rules: { | ||
'alpha-value-notation': 'number', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.html'], | ||
extends: ['stylelint-config-html/html', 'stylelint-config-standard'], | ||
}, | ||
{ | ||
files: ['*.styl', '**/*.styl', '*.stylus', '**/*.stylus'], | ||
customSyntax: stylus, | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { test } from 'bun:test'; | ||
import assert from 'node:assert/strict'; | ||
import { main } from '../../src/index.js'; | ||
import { resolve } from '../../src/util/path.js'; | ||
import baseArguments from '../helpers/baseArguments.js'; | ||
import baseCounters from '../helpers/baseCounters.js'; | ||
|
||
const cwd = resolve('fixtures/plugins/stylelint2'); | ||
|
||
test('Find dependencies with the stylelint plugin (2)', async () => { | ||
const { counters } = await main({ | ||
...baseArguments, | ||
cwd, | ||
}); | ||
|
||
assert.deepEqual(counters, { | ||
...baseCounters, | ||
processed: 4, | ||
total: 4, | ||
}); | ||
}); |