From ccfc0a9f99e798224e492dc3de24a9d6d9d0c24a Mon Sep 17 00:00:00 2001 From: Wu Shangwei <2826256824@qq.com> Date: Fri, 17 Jun 2022 22:12:19 +0800 Subject: [PATCH] feat: Fix compatibility with stylelint 14.0 Signed-off-by: Wu Shangwei <2826256824@qq.com> --- package.json | 4 ++-- src/stylelint.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 01ac241..09a5cca 100644 --- a/package.json +++ b/package.json @@ -67,10 +67,10 @@ "prettier-plugin-organize-imports": "^2.3.4", "prettier-plugin-packagejson": "^2.2.18", "prettier-plugin-two-style-order": "^1.0.0", - "stylelint": "^13.0.0", + "stylelint": "^14.0.0", "stylelint-config-css-modules": "^2.2.0", "stylelint-config-prettier": "^8.0.1", - "stylelint-config-standard": "^20.0.0", + "stylelint-config-standard": "^26.0.0", "stylelint-declaration-block-no-ignored-properties": "^2.1.0", "typescript": "^4.5.4" }, diff --git a/src/stylelint.ts b/src/stylelint.ts index 1e28d14..b17fc3f 100644 --- a/src/stylelint.ts +++ b/src/stylelint.ts @@ -16,6 +16,8 @@ module.exports = { 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }], // webcomponent 'selector-type-no-unknown': null, + 'selector-class-pattern': '^[a-z][a-zA-Z0-9_-]+$', // skip errors from selector-class-pattern + 'selector-id-pattern': '^[a-z][a-zA-Z0-9_-]+$', 'value-keyword-case': ['lower', { ignoreProperties: ['composes'] }], }, ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],