Skip to content

Commit 208019b

Browse files
feat(non-literal-require): support template literals (#81)
* Add non-literal require TemplateLiteral support Currently following code triggers the detect-non-literal-require rule: ```js const foo = require(`bar`) ``` However it would be more accurate (and less noisey) if it triggered on cases such as: ```js const foo = require(`${bar}`) ``` * Add babel-eslint and non-literal-require test * ESLint >6 requires absolute path for ruletester parsers. https://github.com/eslint/eslint/blob/main/docs/user-guide/migrating-to-6.0.0.md#rule-tester-parser * chore: removed dependency on babel-eslint * chore: ran linting fix Co-authored-by: Grant Murphy <[email protected]>
1 parent fb1d9ef commit 208019b

File tree

3 files changed

+590
-6
lines changed

3 files changed

+590
-6
lines changed

0 commit comments

Comments
 (0)