Skip to content

Commit fa67154

Browse files
katydecorahJason Morris
and
Jason Morris
authored
Migrate to stylelint@16 (#59)
* DRAFT * Node 18 * Adds `npm audit fix` result, bumps semver --------- Co-authored-by: Jason Morris <[email protected]>
1 parent b2eb123 commit fa67154

File tree

39 files changed

+5278
-9880
lines changed

39 files changed

+5278
-9880
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- uses: actions/setup-node@v4
1313
with:
14-
node-version: 16
14+
node-version: 18
1515
cache: 'npm'
1616
- name: Test
1717
run: |

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
dist
33
.coverage
4+
.eslintcache

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx pretty-quick --staged
4+
npx lint-staged

.vscode/settings.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2+
"editor.formatOnSave": true,
23
"editor.defaultFormatter": "esbenp.prettier-vscode",
3-
"prettier.requireConfig": true,
4-
"editor.formatOnSave": true
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": true
6+
}
57
}

.babelrc babel.config.json

File renamed without changes.

jest.config.cjs jest.config.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
module.exports = {
1+
/** @type {import('jest').Config} */
2+
const config = {
23
preset: 'jest-preset-stylelint',
4+
setupFiles: ['<rootDir>/jest.setup.js'],
5+
runner: 'jest-light-runner',
36
clearMocks: true,
47
collectCoverage: false,
58
collectCoverageFrom: ['src/**/*.js'],
@@ -13,8 +16,10 @@ module.exports = {
1316
statements: 75,
1417
},
1518
},
16-
setupFiles: ['./jest.setup.cjs'],
1719
testEnvironment: 'node',
1820
roots: ['src'],
1921
testRegex: '.*\\.test\\.js$|src/.*/__tests__/.*\\.js$',
22+
transform: {},
2023
};
24+
25+
export default config;

jest.setup.cjs

-5
This file was deleted.

jest.setup.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { getTestRule, getTestRuleConfigs } from 'jest-preset-stylelint';
2+
import myPlugin from './src/index.js';
3+
4+
const plugins = [myPlugin];
5+
6+
global.testRule = getTestRule({ plugins });
7+
global.testRuleConfigs = getTestRuleConfigs({ plugins });

0 commit comments

Comments
 (0)