eslint-plugin-raflint 1.5.4 → 1.5.5
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 +2 -0
- package/package.json +1 -1
package/dist/rules/noPathJoin.js
CHANGED
|
@@ -3,7 +3,9 @@ const escapeTemplateLiteral = (value) => value.replaceAll('\\', '\\\\').replaceA
|
|
|
3
3
|
const MESSAGE = 'Utilisez des template strings au lieu de path.join() pour la concaténation de chemins simples';
|
|
4
4
|
const isPathJoinCall = (node) => node.callee.type === 'MemberExpression' &&
|
|
5
5
|
!node.callee.computed &&
|
|
6
|
+
node.callee.object.type === 'Identifier' &&
|
|
6
7
|
node.callee.object.name === 'path' &&
|
|
8
|
+
node.callee.property.type === 'Identifier' &&
|
|
7
9
|
node.callee.property.name === 'join' &&
|
|
8
10
|
node.arguments.length >= 2;
|
|
9
11
|
const rule = {
|