-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9125 from emberjs/test-linting/all-the-eslints
- Loading branch information
Showing
263 changed files
with
4,507 additions
and
3,782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const isolation = require('./isolation.cjs'); | ||
|
||
function defaults(config = {}) { | ||
return { | ||
files: config.files || ['tests/**/*-test.{js,ts}'], | ||
// HACK: diagnostic API significantly overlaps with the qunit API, so we're | ||
// using the qunit plugin to lint diagnostic files. | ||
extends: ['plugin:qunit/recommended'], | ||
rules: Object.assign( | ||
isolation.rules({ | ||
allowedImports: ['@ember/debug', '@ember/test-helpers', ...(config.allowedImports ?? [])], | ||
}), | ||
config?.rules, | ||
{ | ||
'qunit/no-assert-equal': 'off', | ||
'qunit/no-assert-logical-expression': 'off', | ||
'qunit/no-conditional-assertions': 'off', | ||
'qunit/no-early-return': 'off', | ||
'qunit/no-ok-equality': 'off', | ||
'qunit/require-expect': 'off', | ||
} | ||
), | ||
}; | ||
} | ||
|
||
function config() { | ||
return { | ||
files: ['./diagnostic.js'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2022, | ||
}, | ||
env: { | ||
browser: false, | ||
node: true, | ||
es6: true, | ||
}, | ||
plugins: ['n'], | ||
extends: 'plugin:n/recommended', | ||
rules: { | ||
// It's ok to use unpublished files here since we don't ship these | ||
'n/no-unpublished-require': 'off', | ||
// TODO: '@warp-drive/diagnostic/server/default-setup.js' keeps setting these off | ||
'n/no-missing-import': 'off', | ||
'n/no-unpublished-import': 'off', | ||
}, | ||
}; | ||
} | ||
|
||
module.exports = { | ||
config, | ||
defaults, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.