Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugin/lib
fixtures/
demo

plugin/src/templates/inject

*~
*.swp
npm-debug.log
Expand Down
17 changes: 14 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ module.exports = {
'func-style': 'off',
// This is compiled, so we can use modern syntax
'node/no-unsupported-features/es-syntax': 'off',
'node/prefer-global/process': 'off',
'node/global-require': 'off',
// This is a duplicate of `import/no-duplicates` but can handle "import type"
'no-duplicate-imports': 'off',
'node/no-unpublished-import': 'off',
'max-depth': ['error', 4],
complexity: 'off',
'n/no-missing-import': 'off',
},
env: {
Expand All @@ -21,15 +25,22 @@ module.exports = {
overrides: [
...overrides,
{
// Tests use lots of nested callbacks
files: ['*-test.js', '*.spec.js', '**/e2e-tests/*.js'],
files: [
'*-test.js',
'*.spec.js',
'**/e2e-tests/*.js',
'*-test.ts',
'*.spec.ts',
'**/e2e-tests/*.ts',
],
rules: {
'max-nested-callbacks': 'off',
'ava/no-import-test-files': 'off',
},
},
{
// Templates import files from the site itself and needs lots of dynamic requires
files: ['plugin/src/templates/**/*'],
files: ['plugin/src/templates/**/*', 'plugin/test/unit/templates/**/*'],
rules: {
'n/no-unpublished-import': 'off',
'@typescript-eslint/no-var-requires': 'off',
Expand Down
Loading