forked from hudochenkov/stylelint-order
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ffad4b
commit 3a6ece9
Showing
63 changed files
with
271 additions
and
277 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
const { createPlugin } = require('stylelint'); | ||
const { namespace } = require('./utils'); | ||
const rules = require('./rules'); | ||
import stylelint from 'stylelint'; | ||
import { rules } from './rules/index.js'; | ||
import { namespace } from './utils/namespace.js'; | ||
|
||
const rulesPlugins = Object.keys(rules).map((ruleName) => { | ||
return createPlugin(namespace(ruleName), rules[ruleName]); | ||
return stylelint.createPlugin(namespace(ruleName), rules[ruleName]); | ||
}); | ||
|
||
module.exports = rulesPlugins; | ||
// eslint-disable-next-line import/no-default-export | ||
export default rulesPlugins; |
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,5 +1,9 @@ | ||
module.exports = { | ||
order: require('./order'), | ||
'properties-order': require('./properties-order'), | ||
'properties-alphabetical-order': require('./properties-alphabetical-order'), | ||
import { rule as order } from './order/index.js'; | ||
import { rule as propertiesOrder } from './properties-order/index.js'; | ||
import { rule as propertiesAlphabeticalOrder } from './properties-alphabetical-order/index.js'; | ||
|
||
export const rules = { | ||
order, | ||
'properties-order': propertiesOrder, | ||
'properties-alphabetical-order': propertiesAlphabeticalOrder, | ||
}; |
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
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
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,6 +1,6 @@ | ||
const stylelint = require('stylelint'); | ||
const ruleName = require('./ruleName'); | ||
import stylelint from 'stylelint'; | ||
import { ruleName } from './ruleName.js'; | ||
|
||
module.exports = stylelint.utils.ruleMessages(ruleName, { | ||
export const messages = stylelint.utils.ruleMessages(ruleName, { | ||
expected: (first, second) => `Expected ${first} to come before ${second}`, | ||
}); |
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 { namespace } = require('../../utils'); | ||
import { namespace } from '../../utils/namespace.js'; | ||
|
||
module.exports = namespace('order'); | ||
export const ruleName = namespace('order'); |
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,4 +1,4 @@ | ||
const rule = require('..'); | ||
import { rule } from '../index.js'; | ||
|
||
const { ruleName, messages } = rule; | ||
|
||
|
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,4 +1,4 @@ | ||
const { ruleName } = require('..'); | ||
import { ruleName } from '../ruleName.js'; | ||
|
||
testConfig({ | ||
ruleName, | ||
|
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
Oops, something went wrong.