Skip to content

Commit

Permalink
Migrate code to ES modules
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Feb 6, 2024
1 parent 47ea53c commit 82047ea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion __tests__/index.mjs → __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import test from 'ava'
import stylelint from 'stylelint'

import config from '../index.js'
import { correctOrder, incorrectOrder } from './_fixtures.mjs'
import { correctOrder, incorrectOrder } from './_fixtures.js'

const runStylelint = async (code) => {
let data = await stylelint.lint({
Expand Down
2 changes: 1 addition & 1 deletion groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,4 +436,4 @@ const propertyGroups = [
},
]

module.exports = propertyGroups
export default propertyGroups
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const propertyGroups = require('./groups.js')
import propertyGroups from './groups.js'

module.exports = {
const config = {
plugins: ['stylelint-order'],
rules: {
'order/properties-order': propertyGroups,
},
}

export default config

0 comments on commit 82047ea

Please sign in to comment.