Skip to content

Commit

Permalink
feat: Upgrade libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
tatibouet committed Mar 22, 2024
1 parent 37416ae commit c0a5d47
Show file tree
Hide file tree
Showing 13 changed files with 3,983 additions and 1,961 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"root": true,
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 11
"sourceType": "module",
"ecmaVersion": 2020
},
"env": {
"node": true,
Expand All @@ -11,8 +12,9 @@
"overrides": [
{
"files": ["*.test.js"],
"plugins": ["jest"],
"env": {
"jest": true
"jest/globals": true
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm test
pnpm run lint
pnpm test
5 changes: 3 additions & 2 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added .idea/copilot/chatSessions/00000000000.xd
Binary file not shown.
Binary file added .idea/copilot/chatSessions/blobs/version
Binary file not shown.
140 changes: 140 additions & 0 deletions .idea/copilot/chatSessions/xd.lck

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
* limitations under the License.
*/

"use strict";
import path from "node:path";
import fs from "node:fs";
import stylelint from "stylelint";

const path = require("path");
const fs = require("fs");
const stylelint = require("stylelint");
const config = require("../index");
import config from "../index";

const validStyles = fs.readFileSync("__tests__/valid.pcss", "utf-8");
const invalidStyles = fs.readFileSync("__tests__/invalid.pcss", "utf-8");
Expand Down Expand Up @@ -85,12 +84,12 @@ describe("does error and flags warnings with invalid styles", () => {
).toHaveLength(5);
});

it("flags 4 warnings", () => {
it("flags 21 warnings", () => {
expect(
data.results[0].warnings.filter(
(warning) => warning.severity === "warning"
)
).toHaveLength(4);
).toHaveLength(21);
});
});

Expand All @@ -109,7 +108,7 @@ describe("handles Sass files", () => {
},
];
data = await stylelint.lint({
files: [path.join(__dirname, "valid.scss")],
files: [path.resolve("__tests__/valid.scss")],
config: customConfig,
});
});
Expand Down
19 changes: 19 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2024 Charles Tatibouët
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or plied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = {
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
};
4 changes: 1 addition & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"use strict";

module.exports = {
export default {
extends: ["@commitlint/config-conventional"],
rules: {
"subject-case": [2, "always", "sentence-case"],
Expand Down
10 changes: 4 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@
* limitations under the License.
*/

"use strict";
import propertiesOrder from "./properties-order.js";

const propertiesOrder = require("./properties-order");

module.exports = {
export default {
extends: ["stylelint-config-recommended"],
plugins: [
"@ronilaukkarinen/stylelint-a11y",
"@double-great/stylelint-a11y",
"stylelint-no-unsupported-browser-features",
"stylelint-order",
],
rules: {
"a11y/line-height-is-vertical-rhythmed": true,
"a11y/media-prefers-reduced-motion": true,
"a11y/no-outline-none": true,
"a11y/selector-pseudo-class-focus": true,
"at-rule-empty-line-before": [
"always",
Expand Down
44 changes: 25 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "stylelint-config-neat",
"version": "2.5.0",
"description": "A neat shareable config for stylelint",
"type": "module",
"main": "index.js",
"files": [
"index.js",
Expand All @@ -13,7 +14,7 @@
"lint:md": "remark --quiet --frail --ignore-path .gitignore .",
"lint": "npm-run-all --parallel lint:*",
"semantic-release": "semantic-release",
"test": "jest",
"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest",
"prepare": "husky install"
},
"remarkConfig": {
Expand All @@ -37,32 +38,37 @@
},
"homepage": "https://github.com/charlestati/stylelint-config-neat#readme",
"dependencies": {
"@ronilaukkarinen/stylelint-a11y": "1.2.7",
"stylelint-config-recommended": "11.0.0",
"stylelint-config-recommended-scss": "9.0.1",
"stylelint-no-unsupported-browser-features": "6.1.0",
"stylelint-order": "6.0.3"
"@double-great/stylelint-a11y": "3.0.2",
"stylelint-config-recommended": "14.0.0",
"stylelint-config-recommended-scss": "14.0.0",
"stylelint-no-unsupported-browser-features": "8.0.1",
"stylelint-order": "6.0.4"
},
"devDependencies": {
"@commitlint/cli": "17.4.4",
"@commitlint/config-conventional": "17.4.4",
"@semantic-release/changelog": "6.0.2",
"@semantic-release/commit-analyzer": "9.0.2",
"@babel/core": "7.24.3",
"@babel/preset-env": "7.24.3",
"@commitlint/cli": "19.2.1",
"@commitlint/config-conventional": "19.1.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/commit-analyzer": "12.0.0",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "8.0.7",
"@semantic-release/npm": "9.0.2",
"@semantic-release/release-notes-generator": "10.0.3",
"eslint": "8.36.0",
"eslint-config-stylelint": "18.0.0",
"eslint-plugin-prettier": "4.2.1",
"@semantic-release/github": "10.0.2",
"@semantic-release/npm": "12.0.0",
"@semantic-release/release-notes-generator": "12.1.0",
"babel-jest": "29.7.0",
"cross-env": "7.0.3",
"eslint": "8.57.0",
"eslint-config-stylelint": "21.0.0",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-prettier": "5.1.3",
"husky": "8.0.3",
"jest": "29.5.0",
"jest": "29.7.0",
"npm-run-all": "4.1.5",
"prettier": "2.8.4",
"prettier": "3.2.5",
"remark-cli": "11.0.0",
"remark-preset-lint-recommended": "6.1.2",
"remark-preset-prettier": "2.0.1",
"semantic-release": "20.1.1",
"stylelint": "15.3.0"
"stylelint": "16.2.1"
}
}

0 comments on commit c0a5d47

Please sign in to comment.