eslint-plugin-raflint 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rules/noPathJoin.js +3 -1
- package/package.json +15 -11
package/dist/rules/noPathJoin.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Le backslash doit etre echappe en premier, sinon il redouble ceux ajoutes ensuite.
|
|
2
|
+
const escapeTemplateLiteral = (value) => value.replaceAll('\\', '\\\\').replaceAll('`', '\\`').replaceAll('${', '\\${');
|
|
1
3
|
const rule = {
|
|
2
4
|
meta: {
|
|
3
5
|
type: 'suggestion',
|
|
@@ -17,7 +19,7 @@ const rule = {
|
|
|
17
19
|
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
18
20
|
const parts = node.arguments.map((argument) => {
|
|
19
21
|
if (argument.type === 'Literal' && typeof argument.value === 'string') {
|
|
20
|
-
return argument.value;
|
|
22
|
+
return escapeTemplateLiteral(argument.value);
|
|
21
23
|
}
|
|
22
24
|
return `\${${sourceCode.getText(argument)}}`;
|
|
23
25
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-raflint",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"author": "Raphael Piccolo",
|
|
13
13
|
"type": "module",
|
|
14
|
-
"main": "./dist/index.js",
|
|
15
14
|
"exports": "./dist/index.js",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
@@ -22,37 +22,41 @@
|
|
|
22
22
|
"cov": "c8 npm run test",
|
|
23
23
|
"prepare": "husky",
|
|
24
24
|
"prepublishOnly": "npm run build",
|
|
25
|
-
"test": "SILENT=1 mocha --timeout 60000 {,lib/**/,test/**/}*.test.ts"
|
|
25
|
+
"test": "SILENT=1 mocha --timeout 60000 {,lib/**/,src/lib/**/,test/**/}*.test.ts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/eslint-parser": "^8.0.1",
|
|
29
|
-
"eslint-plugin-n": "^18.2.
|
|
29
|
+
"eslint-plugin-n": "^18.2.2",
|
|
30
30
|
"eslint-plugin-sonarjs": "^4.1.0",
|
|
31
|
-
"eslint-plugin-unicorn": "^
|
|
31
|
+
"eslint-plugin-unicorn": "^71.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@eslint/js": "^10.0.1",
|
|
35
|
-
"@stoplight/spectral-cli": "^6.16.
|
|
35
|
+
"@stoplight/spectral-cli": "^6.16.1",
|
|
36
36
|
"c8": "^11.0.0",
|
|
37
37
|
"eslint": "^10.5.0",
|
|
38
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
38
39
|
"eslint-plugin-import-x": "^4.17.1",
|
|
39
40
|
"eslint-plugin-promise": "^7.3.0",
|
|
40
|
-
"eslint-plugin-raflint": "^1.
|
|
41
|
+
"eslint-plugin-raflint": "^1.5.0",
|
|
42
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
41
43
|
"globals": "^17.7.0",
|
|
42
44
|
"husky": "^9.1.7",
|
|
43
45
|
"lint-staged": "^17.0.8",
|
|
44
46
|
"markdownlint": "^0.41.0",
|
|
45
47
|
"mocha": "^11.7.6",
|
|
46
|
-
"prettier": "^3.9.
|
|
48
|
+
"prettier": "^3.9.5",
|
|
47
49
|
"ts-api-utils": "^2.5.0",
|
|
48
|
-
"tsx": "^4.
|
|
49
|
-
"typescript": "^6.0.3"
|
|
50
|
+
"tsx": "^4.23.1",
|
|
51
|
+
"typescript": "^6.0.3",
|
|
52
|
+
"typescript-eslint": "^8.63.0"
|
|
50
53
|
},
|
|
51
54
|
"engines": {
|
|
52
55
|
"node": ">=21.0.0"
|
|
53
56
|
},
|
|
54
57
|
"allowScripts": {
|
|
55
58
|
"unrs-resolver": true,
|
|
56
|
-
"esbuild": true
|
|
59
|
+
"esbuild": true,
|
|
60
|
+
"@scarf/scarf": false
|
|
57
61
|
}
|
|
58
62
|
}
|