- Linting: Add notes on some

- npm: Switch `prepare`->`prepublish` as causing problems for Git installs
This commit is contained in:
Brett Zamir
2020-04-03 08:15:27 +08:00
parent 3c10411594
commit fccd584ab8
2 changed files with 15 additions and 2 deletions

View File

@@ -93,9 +93,10 @@ module.exports = {
},
rules: {
// Todo: Figure out why this is not enough to disable warning
// for examples
// for examples in my environment (but it is in others')
// Used in examples of assert-close.js plugin
'mocha-cleanup/no-assertions-outside-it': 'off',
'eslint-comments/no-unused-disable': 'warn',
'eol-last': ['off'],
'no-console': ['off'],
@@ -277,6 +278,11 @@ module.exports = {
]
},
rules: {
// These errors are caused in Cypress files if user has not yet instrumented
// code; need to reinvestigate why we had to instrument separately from nyc mocha
'import/no-unresolved': 'warn',
'node/no-missing-import': 'warn',
'chai-expect-keywords/no-unsupported-keywords': [
'error', {
allowChaiDOM: true
@@ -318,6 +324,13 @@ module.exports = {
}
],
rules: {
// check-examples is not picking up eslint config properly in some
// environments; see also discussion above
// `mocha-cleanup/no-assertions-outside-it`
'jsdoc/check-examples': ['warn', {
rejectExampleCodeRegex: '^`'
}],
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/453
'unicorn/regex-shorthand': 0,
// The Babel transform seems to have a problem converting these

View File

@@ -59,7 +59,7 @@
"build-by-config": "rollup -c rollup-config.config.js",
"prep-no-core-rollup": "run-s eslint build-html build-by-config",
"prep": "run-s prep-no-core-rollup rollup",
"prepare": "run-s license-badges copy prep",
"prepublish": "run-s license-badges copy prep",
"prepublishOnly": "run-s build-docs",
"cypress:open-no-start": "cypress open",
"cypress:open": "run-p start cypress:open-no-start",