diff --git a/configs/stylistic.js b/configs/stylistic.js index 58caaaf..5cb8491 100644 --- a/configs/stylistic.js +++ b/configs/stylistic.js @@ -16,7 +16,7 @@ const recommendedConfig = { "@stylistic/quotes": [ "error", "double", - { avoidEscape: true, allowTemplateLiterals: false }, + { avoidEscape: true, allowTemplateLiterals: "never" }, ], "@stylistic/spaced-comment": [ "error", diff --git a/package-lock.json b/package-lock.json index 4f279c3..03ce4fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "devDependencies": { "@eslint/js": "^9.29.0", "@eslint/markdown": "^6.6.0", - "@stylistic/eslint-plugin": "^5.0.0", + "@stylistic/eslint-plugin": "^5.2.2", "eslint": "^9.29.0", "eslint-find-rules": "^5.0.0", "eslint-plugin-import": "^2.32.0", @@ -50,6 +50,7 @@ "eslint-plugin-jsdoc": ">= 50.7.1", "eslint-plugin-n": ">= 17.19.0", "eslint-plugin-prettier": ">= 5.4.1", + "eslint-plugin-react": ">= 7.37.5", "eslint-plugin-unicorn": ">= 59.0.1", "globals": ">= 16.2.0", "prettier": ">= 3.5.3", @@ -69,6 +70,9 @@ "eslint-plugin-n": { "optional": true }, + "eslint-plugin-react": { + "optional": true + }, "typescript": { "optional": true }, @@ -1803,18 +1807,18 @@ } }, "node_modules/@stylistic/eslint-plugin": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.0.0.tgz", - "integrity": "sha512-nVV2FSzeTJ3oFKw+3t9gQYQcrgbopgCASSY27QOtkhEGgSfdQQjDmzZd41NeT1myQ8Wc6l+pZllST9qIu4NKzg==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.2.2.tgz", + "integrity": "sha512-bE2DUjruqXlHYP3Q2Gpqiuj2bHq7/88FnuaS0FjeGGLCy+X6a07bGVuwtiOYnPSLHR6jmx5Bwdv+j7l8H+G97A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/types": "^8.34.1", + "@typescript-eslint/types": "^8.37.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "estraverse": "^5.3.0", - "picomatch": "^4.0.2" + "picomatch": "^4.0.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1823,10 +1827,24 @@ "eslint": ">=9.0.0" } }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz", + "integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 10b456a..5095900 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "devDependencies": { "@eslint/js": "^9.29.0", "@eslint/markdown": "^6.6.0", - "@stylistic/eslint-plugin": "^5.0.0", + "@stylistic/eslint-plugin": "^5.2.2", "eslint": "^9.29.0", "eslint-find-rules": "^5.0.0", "eslint-plugin-import": "^2.32.0", diff --git a/validation/code.js b/validation/code.js index 7508319..945fd38 100644 --- a/validation/code.js +++ b/validation/code.js @@ -947,3 +947,25 @@ export const aaa = 1; sumFn(1, 2); export const bbb = 1; + +const backtick1 = `back +tick`; +// eslint-disable-next-line @stylistic/quotes +const backtick2 = `back\ntick`; +const backtick3 = tag`backtick`; +// eslint-disable-next-line @stylistic/quotes +const backtick4 = `single`; +// eslint-disable-next-line @stylistic/quotes +const backtick5 = `\``; +// eslint-disable-next-line @stylistic/quotes +const backtick6 = `"`; + +/** + * @param {...string[]} args args + * @returns {string} concated strings + */ +function concat(...args) { + return args.join("\n"); +} + +concat(backtick1, backtick2, backtick3, backtick4, backtick5, backtick6);