Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-ash-nazg

brettz91.4kMIT36.22.2TypeScript support: included

An expansion and tweaking of the "standard" config style for ESLint

eslint, eslintconfig

readme

eslint-config-ash-nazg

A ruthless--though not arbitrary--degree of control for your kingdom!

One ring to rule them all!

Installation

npm i -D eslint-config-ash-nazg
install-peerdeps -d eslint-config-ash-nazg

The rules

See main.js (and node.js for ash-nazg/node rules) for the rules we explicitly include (and see sauron.js for the even stricter ash-nazg/sauron rules or great-eye (or great-eye-node) for still stricter rules though which are probably best not used).

(See explicitly-unused.js for the core and extended rules we don't include (rationale for non-inclusion below).)

I've focused below on deviations because the original sites tend to already articulate the usefulness of the rules I have incorporated for these plugins/configs. This is for tracking design choices and not disparaging the utility of non-included rules.

Other bundled configs

The ash-nazg/node config expands upon the regular ash-nazg rules to add rules specific to Node environments. Specifically, plugin:node/recommended-module has been adopted for now along with some stylistic choices. However, if you are using more CJS exports, you can override this by adding plugin:node/recommended-script to your extends array (after ash-nazg) or, for Sauron-Node, by using sauron-node-script.

The ash-nazg/node configs also detect minimum Node from engines and set env to use the highest supported ES globals, e.g., ES2021 (and also sets node: true) as well as sets ecmaVersion.

The ash-nazg/sauron config expands upon the regular ash-nazg rules to indicate what are generally best practices but are less likely to be due to an error and may possibly also require a high (and possibly tyrannical) degree of refactoring for existing projects. See below for the rationales for inclusion.

The ash-nazg/great-eye and ash-nazg/great-eye-node configs expands on ash-nazg/sauron (and ash-nazg/sauron-node) to include rules which enforce good practices, but which are so cumbersome and may flag too much legitimate code that I personally won't regularly use them. Still, I like to track them here, including in the event that their config changes to make them less all-encompassing.

The ash-nazg/sauron-node config incorporates both ash-nazg/node and ash-nazg/sauron. It adds specific rules of its own which may be unduly strict for ash-nazg/node.

A few experimental configs have been added as well, though this might be removed or significantly modified in a future version:

  • +script-node.js: Applies script source type with Node; used by sauron-node-script
  • +script.js: Applies script source type for non-Node; used by sauron-script
  • sauron-node-overrides.js: sauron-node with rc and mocha
  • sauron-node-script-overrides.js): sauron-node-script with rc and mocha
  • sauron-overrides.js: sauron with rc and mocha
  • sauron-script.js: sauron with +script.js file
  • sauron-script-overrides.js: sauron-script with rc and mocha
  • +babel.js: Wraps a module to support equivalent babel/eslint-parser rules
  • mocha.js: Sets up Mocha (and chai global) on test directories (via overrides)
  • mocha-plus.js: Strict but reasonable rules for checking Mocha/Chai (not naming "sauron" as not bundling with Sauron)
  • cypress.js: Strict but reasonable rules for checking Cypress
  • overrides.js: Config for overrides to give browser directories, and config and RC config files suitable default config

Comparison to other "standards"

eslint-config-ash-nazg is a collection of some excellent preexisting rules other projects have created, curated with the intent of attaining productive strictness.

"standard" (config) and eslint:recommended have brought a welcome degree of pseudo-standardization for code styling and error checking.

However, they do not impose as high of a degree of control as one may find desirable to enforce common, sane styling practices, catch bad practices and hard-to-read patterns, or in some cases even catch errors.

Moreover, standard enforces a few styling rules which are contrary to regular JavaScript practice (e.g., its enforced absence of semi-colons).

ash-nazg aims to offer defaults which adhere to norms, build upon productive restrictions, and in a few cases, offer greater latitude where some constraints are unduly confining.

To see which rules from an extended config ended up enabled (we are typically inheriting "recommended" configs), see /inherited-rules/implicitly-included.

To see which rules from the extended config we disabled, see our relevant config(s) (e.g., main.js).

To see which rules from the plugin that each extended config derives from (i.e., the non-recommended rules of a plug-in), see explicitly-unused.js for ones we have consciously not used and see our relevant config(s) (e.g., main.js) for the ones we did add (alongside any recommended).

The unused folder is used to capture any (non-recommended) rules which are not explicitly either enabled or within explicitly-unused.js (as might be found during an update of our config dependencies), but it is currently, and should hopefully remain, empty, as we wish to be consciously aware of all rules from inherited projects and whether we wished to include them. As far as new rules added to recommended, we can see these within diffs of inherited-rules/implicitly-included files (built during development by npm run compare).

Rationales for inclusion of dependent plug-ins

Besides incorporating more from ESLint core, we also add rules from a few other (peer) dependencies.

  • eslint-plugin-compat - Though its list of browsers to support is not added by our code, it is a basic enough of a need to remind one of its need to be present (and to avoid needing to add the rule for it).
  • eslint-plugin-import - Besides being peer dependencies of standard, this has some additional useful rules we apply.
  • eslint-plugin-jsdoc - provides a number of helpful rules for catching bad or incomplete JSDoc during development. Note that we do not impose jsdoc/require-jsdoc except as a warning in ash-nazg/sauron mode, so all of the eslint-plugin-jsdoc rules should only apply when JSDoc is used. We also avoid some of eslint-plugin-jsdoc stricter checking requirements for descriptions.
  • @eslint/markdown - Another basic use case is ensuring code snippets are linted, which is why this is expected. You may find ESLint's discussion of overrides helpful for tweaking rules for Markdown (and you may also wish to use overrides, for the eslint-plugin-jsdoc rule check-examples if you wish to lint your JSDoc examples according to different standards). In ESLint 7 it is no longer necessary to pass the file extension within the --ext flag, e.g., --ext js,md to get this to take effect when used in overrides[].files (though it does seem to be required to include md if you do use --ext).
  • eslint-plugin-html - One basic use case is ensuring HTML is linted, which is why this is expected. You may wish to use overrides for HTML-specific rules or enable the plugin's own rules. In ESLint 7 it is no longer necessary to pass the file extension within the --ext flag, e.g., --ext js,html to get this to take effect when used in overrides[].files (though it does seem to be required to include md if you do use --ext). (The HTML plugin lacks the Markdown plugin's ability to treat separate blocks differentially, but an issue was filed requesting support.)
  • eslint-plugin-promise - Besides being peer dependencies of standard, this has some additional useful rules we apply.

Deviations

In comparison to eslint:recommended, ash-nazg only adds restrictions with the exceptions of:

  1. Loosening the ESLint < 6 requirement of no-console into a mere warning and only in the stricter ash-nazg/sauron configuration. This is for the reason that console logging is too useful for debugging (and sometimes for reporting progress) to have to disable it at every turn and to distract one from actual errors.
  2. Change no-empty so that allowEmptyCatch is true. There are enough cases where one legitimately needs to suppress errors.

Rationale for overriding standard rules

  1. semi - Even if not strictly required, semi-colons are conventional in JavaScript and help denote the end of statements (as opposed to the end of a line which may continue).
  2. indent - While it may take some getting used to, 2 spaces does allow more in one's field of vision. However, changed to use outerIIFEBody for avoiding indents with the IIFE body, as this often minimizes indent level for much or all of the whole file.
  3. object-property-newline - Properties on the same line can be very convenient, including stacking for space to avoid max length (though without stacking the height too high).
  4. one-var - While I normally favor enforcing conventions, this one seems to me to be of little consequence. It also prevents grouping like items together. I might favor an option to require separate lines for variable declarations, but for uninitialized ones, adding to the same line is convenient, especially for single-letter variables. I would like a rule to have declarations as close as possible to being just above any used scopes (for let and const).
  5. object-curly-spacing - Not sure why standard switched from the default here.
  6. quotes - avoidEscape is too reasonable to avoid ugliness; allowTemplateLiterals is useful to begin a pattern that may expend to allow other quotes or dynamic variables.
  7. object-curly-newline - Doesn't allow let f = {foo () { dosomething(); }};
  8. lines-between-class-members - Don't feel any need for it
  9. @stylistic/spaced-comment - Adding markers for sake of TS-style /// <reference> comments.

Rationale for changing required rules' configuration away from ESLint defaults

While these are not part of standard or eslint-recommended, I've noted here why we have deviated from the defaults set by ESLint for those applying the rule.

  • array-bracket-newline - Switched to "consistent" over "always" as sometimes nice to be a little condensed, especially when representing HTML as JSON within Jamilih (or JsonML) templates.
  • function-paren-newline - The default multiline can get too long whereas "consistent" can be clean and short.
  • multiline-ternary - Inline ternary can be very readable when not spanning lines
  • no-empty - Empty catches occur frequently enough to justify allowEmptyCatch
  • no-mixed-requires - Grouping is more organized, while calls are compellingly convenient
  • no-warning-comments - As per great-eye discussion of this rule, to-dos can be useful, but we nevertheless include the rule with terms set to fixme and xxx so we reject these other forms of todo. To also reject todo, see great-eye.
  • no-restricted-globals - Use example defaults for event (and fdescribe) as convenient
  • no-restricted-properties - Use example default of restricting __defineGetter__ in favor of Object.defineProperty as convenient
  • no-restricted-syntax - Set to eliminate any use of instanceof (as it is not cross-frame safe, except if using Symbol.hasInstance)
  • no-shadow - It is better practice not to confuse by using globals! I didn't feel the examples for allowing necessitated their use. I added "parent", "top", "open", "close", "stop", "blur", "status", "name", "closed", and "start" to allow as frequent local variables technically shadowing globals (start for QUnit env).
  • object-shorthand - Enabling avoidExplicitReturnArrows as methods without this that this rule grabs (which have their own meaning with arrow functions) are more succinctly expressed in shorthand, and shorthand also conduces better to events where this refers to the element (unless one needs the outer scope this). The option avoidExplicitReturnArrows does not avoid if the functions have this (though this isn't currently documented); this is probably good, though use of this may signal an error if within a method
  • prefer-destructuring - Did not set array to true due to its problems with direct access of large numbers (requiring many commas) and non-iterable ‘array-like’ objects.
  • quote-props - Changed to "as-needed" as properties more verbose and uglier with quoting
  • radix - We're only dealing with ES5+ environments, so the radix is redundant for base 10.
  • import/order - Enforcing "builtin", "external", "internal" and then ["parent", "sibling", "index"] in any order as these may be project-specific.
  • import/no-unresolved - fs/promises should be allowed by default as a Node module. @uce/reactive is just a virtual package (as used by uce-template.

Rationale for not including some rules

The following rules are not included within eslint:recommended or standard, nor have we chosen to include them in any of the ash-nazg rules.

Note: italicized items refer to features I might enable if the described option could become available (or upon further review). I might also tweak some standard rules further which I have not had time to examine (but it would probably be toward the stricter rather than looser as I have been happy with it thus far).

  • array-element-newline - While the "consistent" option would be nice, it doesn't work well to keep up with a max width and the desire to avoid excessive height [\n a, b, \n c, d\n]
  • arrow-body-style - With as-needed and requireReturnForObjectLiteral, this seems reasonable, but too often in debugging, one needs to add brackets to do any logging.
  • func-names - Too prohibitive, though if applied to methods only, it may be useful (though with object shorthand, less necessary)
  • func-style - Declarations are simpler so appealing also. If enabling, would also want allowArrowFunctions.
  • id-blacklist - Can be helpful but a little tyrannical
  • id-length - Can be helpful (especially a minimum) but a little tyrannical
  • id-match - Too project-specific
  • init-declarations - Nice with "always" and ignoreForLoopInit, but cumbersome and seemingly wasteful at times
  • line-comment-position - Too inflexible to enforce either way
  • lines-around-comment - Irksome to me
  • max-classes-per-file - A bit tyrannical
  • max-depth - Sounds good but tyrannical
  • max-lines-per-function - A bit tyrannical
  • max-lines - A bit tyrannical
  • max-params - Can be troublesome when one is forced to abide by some API
  • multiline-comment-style - Would be nice if allowed multiline "starred-block" OR "bare-block" given some one may wish as JSDoc-style and others not
  • newline-after-var - Not very flexible (deprecated)
  • newline-before-return - Not very flexible (deprecated)
  • newline-per-chained-call - Not flexible in practice
  • no-continue - Can be convenient
  • no-inline-comments - Can be faster and more succint
  • no-invalid-this - Sounds good but not useful for element event handlers/jQuery
  • no-multi-assign - Sounds good, but can be burdensome
  • no-negated-condition - Is generally simpler, but it can be annoying if one wishes to get a much smaller condition body visible at the top.
  • no-nested-ternary - Nested ternaries can be helpful to avoid clutter of duplicated assignment code
  • no-param-reassign - Can be helpful, but not convenient, including when making defaults against more than undefined (e.g., null)
  • no-restricted-imports - Project-specific
  • no-restricted-modules - Project-specific
  • no-ternary - Not useful
  • no-undefined - undefined is ok for ES6 modules and strict code, so using no-global-assign and no-shadow-restricted-names instead
  • no-underscore-dangle - Too restrictive
  • no-useless-concat - Too restrictive when one has certain formatting one wishes to draw out
  • one-var-declaration-per-line - Sounds good, but too cumbersome for small integer or boolean inits, and the indented next lines are not as immediately clear that they belong to the declaration.
  • padding-line-between-statements - Might revisit
  • prefer-arrow-callback - Not compelling
  • prefer-template - Sounds good, but too cumbersome in practice
  • require-atomic-updates - Many false positives
  • sort-imports - Would be useful with "warn" if could sort by multiple/single type and sort members while avoiding alphabetical sorting across imports which seems too rigid
  • sort-keys - Too cumbersome
  • sort-vars - Too cumbersome

Rationale for disabled import rules

  • import/no-restricted-paths - Project-specific
  • import/no-internal-modules - Useful but have to specify, so project-specific
  • import/no-import-module-exports - Seems redundant for normal CJS
  • import/no-cycle - Don't see a problem with cyclic imports in ESM
  • import/no-nodejs-modules - Useful for some projects, but not all including even client-side (though does offer allow option)
  • import/no-relative-packages - Not needed for general environments
  • import/exports-last - Has some reason for being, but nicer to see with declaration that the object is being exported. To find all, just search for "export"
  • import/no-namespace - While can be more efficient to import only what one needs, having a namespace can also avoid confusion.
  • import/prefer-default-export - Could even be a bad practice as ugly to import with non-defaults added later
  • import/no-default-export - Has some basis, but defaults are admittedly convenient. Let's not be so opinionated.
  • import/no-named-export - Could even be a bad practice as ugly to import with non-defaults added later
  • import/no-relative-parent-imports - Appealing in some ways, but too rigid for a broad standard
  • import/dynamic-import-chunkname - Might revisit for warnings, but probably too specific for a broad standard
  • import/max-dependencies - Too constraining
  • import/no-unassigned-import - Could be useful with allow option, but that would be project-specific, and unassigned imports are needed for polyfills
  • import/group-exports - Too rigid as with exports-last.

Rationale for disabled Node and Promise rules

no-process-exit (added by Node recommended) - has a version in Unicorn which allows in CLI apps.

node/no-missing-import - Redundant with import/no-unresolved

node/file-extension-in-import - Redundant with import/extensions and has no ignorePackages option currently.

node/prefer-promises/dns and node/prefer-promises/fs are good, but a bit early with Node 12.

node/no-restricted-import - project-specific

node/no-restricted-require - project-specific

promise/no-native is disabled as promises are essential--even, it appears, to Dark Lords.

promise/param-names can be too tyrannical in some cases.

promise/no-nesting - can be useful to nest sometimes

promise/no-promise-in-callback - May be difficult to apply (Note: Is disabled in main.js but enabled in sauron.js)

promise/no-callback-in-promise - May be difficult to apply (Note: Is disabled in main.js but enabled in sauron.js)

promise/avoid-new - Can be useful or even necessary for APIs missing Promise version (Note: Is disabled in main.js but enabled in sauron.js; could use promisify)

promise/no-return-in-finally - (Note: Is disabled in main.js but enabled in sauron.js)

promise/valid-params - (Note: Is disabled in main.js but enabled in sauron.js)

Rationale for suppressing some eslint-plugin-jsdoc rules

  • jsdoc/no-blank-blocks - Too useful to progressively build docs with blank ones
  • jsdoc/check-line-alignment - More desirable default not yet implemented
  • jsdoc/informative-docs - Too troublesome to deal with descriptions as it is
  • jsdoc/no-blank-block-descriptions - Bad for debugging
  • jsdoc/no-types - Types have utility in jsdoc unless using TypeScript
  • jsdoc/newline-after-description (recommended) - I can see its draw, but seems too pedantic to me for documentation.
  • jsdoc/no-defaults - Haven't transitioned to TypeScript
  • jsdoc/no-undefined-types (recommended) - I'd like something like this, but since it isn't aware of all of one's @typedefs, etc., it is too restrictive for me at this time.
  • jsdoc/require-description-complete-sentence seems like a good idea, as English mistakes can be jarring as with bad styling, but this didn't seem to work too well. I use jsdoc/match-description with a special value to capture a subset of this.
  • jsdoc/require-hyphen-before-param-description - I can see its draw, but seems too pedantic to me for documentation.
  • jsdoc/sort-tags - A bit oppressive (and probably a bit unstable still as a new rule); might revisit
  • jsdoc/no-missing-syntax - Nothing currently wish to enforce
  • jsdoc/no-restricted-syntax - Nothing currently wish to enforce

Rationale for disabling some unicorn rules

(The following are recommended rules unless otherwise noted.)

  • catch-error-name - It can actually be useful to use different error names to indicate what type of error may be expected.
  • consistent-destructuring - In practice can be cumbersome
  • consistent-function-scoping - Though this can be useful, and it shouldn't be difficult to manually hoist functions upward, besides taking some time to refactor, this often removes functions from a logical grouping, and may even increase bugs, as one may be tempted to move out a function whose dependency is no longer wrapped with it.
  • empty-brace-spaces - Easier to build on and cleaner if allowing newlines
  • explicit-length-check - Seems wasteful.
  • filename-case - Looks potentially useful with camelCase.
  • import-index - While understandable, seems may cause more trouble in making it harder to find references to index.
  • import-style - Using eslint-plugin-import instead
  • no-array-reduce - Though I can see some appeal to this (and reduce also suffers from not being able to short-circuit), I like it for object property accumulation, conditional array accumulation that can later be flattened, etc. It also seems superfluous to add an extra join with string concatenation.
  • no-array-for-each - Writing code for forEach allows later refactoring, e.g., to move out of the block.
  • no-await-expression-member - A bit confining for convenience for only a little gain
  • no-instanceof-array - Covered by our blocking of all instanceof
  • no-keyword-prefix - See no need.
  • no-lonely-if - Nested ifs can be useful to catch and ignore.
  • no-negated-condition - Good but cumbersome
  • no-nested-ternary - As with eslint's no-nested-ternary
  • no-null - A good idea, but besides use of null in JSON, and semantic arguments in favor (having an explicit, intentional empty value), it makes for cleaner, quicker to understand code.
  • no-typeof-undefined - Ok but cumbersome, especially if global situation is complicated
  • no-unreadable-array-destructuring - Better to use this than multiple lines
  • no-unused-properties - While no doubt useful, it won't catch all cases, sounds computationally expensive, and may better be done with TypeScript
  • no-useless-switch-case - Still useful for flagging a viable value or faciliating later expansion
  • no-useless-undefined - I don't like the consequence of changing array-callback-return to allowImplicit, and it can make clear that use of undefined is deliberate.
  • prefer-array-flat - Present in array-func
  • prefer-array-flat-map - Present in array-func
  • prefer-at - Not widely available
  • prefer-exponentiation - Now present in eslint core
  • prefer-export-from - Understandable but cumbersome when importing anyways and have to use another style
  • prefer-json-parse-buffer - Not recommended now and may be less performant
  • prefer-module - Handling by different configs instead
  • prefer-node-protocol - Might revisit later if practice becomes adopted
  • prefer-object-from-entries - Too many false positives (e.g., non-simple objects)
  • prefer-optional-catch-binding - Understandable rule, but extra work if refactoring to add later, and the catch binding can also force documentation of the error's purpose
  • prefer-prototype-methods - Sometimes a bit cumbersome
  • prefer-string-slice - Added to Sauron but can be cumbersome to change for old projects
  • prefer-string-replace-all - Good but not available yet in Node (even 14)
  • prefer-top-level-await - Good requires Babel currently
  • regex-shorthand - Was renamed to better-regex.
  • string-content - Don't want the trouble of requiring formatted apostrophes (not recommended anyways).
  • switch-case-braces - Reasonable but burdensome as may not need braces
  • template-indent - Although attractive, requires tooling to be reliable.
  • throw-new-error - Potentially confining.

Rationale for altering default on Unicorn rules

  • better-regex - Character classes can be arranged for readability.
  • unicorn/custom-error-definition - Does not seem confining.
  • unicorn/no-unsafe-regex - Seems like something to watch for, though I may revisit if this reports too many common expressions.
  • unicorn/require-post-message-target-origin - Useful for common cases
  • eslint-comments/no-unused-disable - Might be indicative of an error and inefficient in any case

eslint-comments/disable-enable-pair - If at top, behavior is clear, and no need to reenable within doc

Rationale for not including some eslint-comments rules

  • eslint-comments/no-restricted-disable - See no need
  • eslint-comments/no-use - See no need

Rationale for not including some array-func rules

  • array-func/prefer-array-from - While it may benefit performance, it is more sleek to use the spread operator. Would like to know how much it impacts performance before enabling.

Rationale for not including some sonarjs rules

(All sonarjs rules are currently "recommended" rules as well except as noted.)

  • elseif-without-else - Good rationale but burdensome (not recommended)
  • no-nested-switch - Arbitrary and not helpful for cleaner code
  • no-nested-template-literals - Somewhat reasonable, but also arbitrary
  • max-switch-cases - Sounds too arbitrary.
  • no-collapsible-if - Sometimes more logically clear or made in preparation for future expansion
  • no-commented-code - Overly oppressive
  • no-duplicate-string - Often used in test files and repeated in fairly minor instances or instances repeated but spread out within a large file
  • no-identical-functions - Often used in test files and repeated by fairly minor functions or functions repeated but spread out within a large file
  • no-lonely-if - Oppressive
  • no-nested-conditional - Not needed
  • no-nested-functions - Good idea but restrictive
  • no-primitive-wrappers - Handling elsewhere
  • no-regex-complexity - Oppressive
  • no-self-compare - Handling elsewhere
  • slow-regex - Oppressive
  • no-small-switch - Too useful to start a pattern to which one intends to add later.
  • prefer-default-last - Handling elsewhere
  • prefer-immediate-return - Can be useful for documenting even if method name should be descriptive, especially if there are different returns with subtly different results
  • todo-tag - Use expiring to-dos, etc. instead
  • check-examples - If examples are present, they ought to follow one's standards, including if overrides are in place to loosen/tighten. Set to match any Markdown rules (.md extension) by default and excludes any example beginning with a backtick.
  • check-syntax - Following typescript, not Closure syntax
  • imports-as-dependencies - Useful
  • match-description - Cleaner to see complete sentences which its default allows.
  • no-bad-blocks - Useful to catch blocks likely intended as jsdoc
  • require-returns-check - If the return value doesn't match, there may be a problem.
  • require-file-overview - Don't need @file in every file.

Rationale for only including some rules within ash-nazg/sauron

These are good practices, but cumbersome, not as familiar to developers, prohibitive during ongoing debugging or conversion of existing projects, etc. But perhaps useful for a new project which can pay closer attention to standards without the undue burden of having to refactor lots of code (which may not all be under one's control).

  • class-methods-use-this - Good for new code (though even here may need disabling). May break existing APIs.
  • consistent-this - A good practice, but sometimes, especially with jQuery or DOM event handlers, and large functions where it can be difficult to track what a generic that is in reference to, this may be more clearly named as the object
  • default-case - Refactoring code to know whether to throw or silently ignore requires time.
  • no-implicit-globals with lexicalBindings to true - Light browser apps might now want
  • max-len - May require a lot of refactoring.
  • no-alert - No quick easy replacement yet with poor dialog support.
  • no-console - Useful for debugging (and sometimes for reporting progress) to have to disable it at every turn and to distract one from actual errors, even for production.
  • no-empty-function - Cumbersome to add comments within every no-op.
  • no-shadow - Can catch errors, but also some work to refactor (See also section "Rationale for changing required rules' configuration away from defaults".)
  • prefer-numeric-literals - Good but some work.
  • require-unicode-regexp - Good, but some work to fix all.
  • vars-on-top - Not needed for let/const, and if overriding, this is cumbersome, despite being useful
  • import/unambiguous - A good practice, and one which overrides can override (e.g., for polyfills or simple HTML tests), but cumbersome to label all files
  • promise/prefer-await-to-callbacks - Sometimes useful, but callbacks may be used within repeating events
  • unicorn/no-array-callback-reference - May be cumbersome though does catch potential problems
  • unicorn/prefer-number-properties - Good but some refactoring needed (and not always readily fixable).
  • jsdoc/require-returns (recommended) - Put in ash-nazg/sauron as it is more than just a consistent styling convention, and it is not impossible to follow, but a bit difficult. Added forceRequireReturn option to ensure return type considered even if void/undefined and added contexts: ['any'] so it checks virtual functions (e.g., with @implements).
  • jsdoc/require-jsdoc (recommended) - Imposes a heavy burden on preexisting large projects (added as "error" in great-eye.js); we have expanded its options there though to check on ClassDeclaration, ClassExpression, and MethodDefinition in addition to FunctionDeclaration. This may still FunctionExpression and ArrowFunctionExpression, and these may admittedly be used on such as exports, but until the context option discussed at https://github.com/gajus/eslint-plugin-jsdoc/issues/384 may be fixed, that may be too oppressive to impose.
  • jsdoc/require-param-name (recommended): Expanded this to contexts: ['any']; see description for jsdoc/require-jsdoc.
  • jsdoc/require-param-type (recommended): Expanded this to contexts: ['any']; see description for jsdoc/require-jsdoc.
  • jsdoc/require-returns-type (recommended): Expanded this to contexts: ['any']; see description for jsdoc/require-jsdoc.
  • jsdoc/implements-on-classes - Added with contexts: ['any']; see description for jsdoc/require-jsdoc. Better to be TypeScript-compatible.

The forceRequireReturn setting was also applied therein as it may be cumbersome to add to all returns or not favored as a requirement in all projects though it does note that a method's return was considered even if undefined.

The preferredTypes setting was enabled here as it can be cumbersome for projects to specify all child types.

Rationale for only including some rules within ash-nazg/great-eye

  • capitalized-comments - May be very prevalent; reports with commented out code
  • complexity - A generally good practice, but can be work to refactor, and sometimes impractical to enforce.
  • no-shadow with hoist: 'all' - A person should generally be able to track what they have in a function and it can be useful to reuse the variable name, but to really prevent any possible confusion, this should be set.
  • max-statements-per-line - Tyrannical when prohibiting single-line if (...) { continue; }; might revisit if allowed for control statements
  • max-statements - A bit tyrannical even if good for clear code
  • no-magic-numbers - Very helpful for clear code, but cumbersome, and sometimes very cumbersome.
  • no-plusplus - Would be nice if there were an option to allow if not combined inline with other expressions
  • no-warning-comments (with default value on terms option blocking "todo") - Good to catch to-dos, but better to search or parse code as a separate process rather than polluting one's ESLint warnings--some to-dos are ok to be left for the long term
  • import/no-unused-modules - Useful (for missingExports at least), but doesn't catch dynamic imports and reports for other deliberately non-modular scripts
  • jsdoc/check-alignment (recommended) - A pretty good practice, but not that important.
  • jsdoc/check-indentation - A pretty good practice, but that that important.
  • jsdoc/require-description - Though a very good practices, this is difficult for large code bases to implement and even cumbersome for new ones to have to follow for lesser parameters, so that's why they are not even in ash-nazg/sauron, though if you feel you can succeed at imposing such rigor for your hordes of developer minions, by all means, have a hand at it...
  • jsdoc/require-param-description (recommended) - See jsdoc/require-description.
  • jsdoc/require-returns-description (recommended) - See jsdoc/require-description.
  • jsdoc/require-property-description (recommended) - See jsdoc/require-description.
  • jsdoc/require-example - See jsdoc/require-description.
  • sonarjs/cognitive-complexity - As with complexity perhaps (though may add to sauron if demonstrates not to be too oppressive)
  • unicorn/numeric-separators-style - Good but may involve many changes.
  • unicorn/prevent-abbreviations - Very cumbersome for frequent conventions such as e for event
  • unicorn/prefer-set-has - Very good, but troublesome to refactor.
  • unicorn/prefer-object-has-own - Good but only available by polyfill

The preferredTypes setting was enabled here for integer/float as it can be cumbersome for projects to distinguish and because Promise even subclassed doesn't indicate the rejector type.

Rationale for not including some rules in @brettz9/eslint-plugin

  • @brettz9/for-of - Iterating functions can be easier to refactor

Rationale for including rules that might not seem necessary

  • no-implicit-globals - Included despite not applying to modules, in case overriding.
  • strict - Included despite not being needed for modules, in case overriding.
  • no-return-await - As per this issue, it causes problems with stack traces and fails to flag function return as async (particularly in conjunction with require-await which effectively enforces not using async on such functions either).
  • prefer-object-has-own - Not yet supported in all Node
  • (This section is incomplete)

Deprecated rule non-inclusion

Deprecated and removed items from ESLint are also naturally not included.

Contributing

While I will admit to being opinionated, and one may need to disable some rules (or possibly add a few ones mentioned in my non-inclusion sections), feel free to file issues if you really feel there are compelling reasons for different defaults. But again, I have to add caution that ring bearers can be picky about giving up their preh-shus...

High-priority to-dos

  1. Restore the following as may become available in flat config:
    1. eslint-plugin-unsanitized
    2. @fintechstudios/eslint-plugin-chai-as-promised (has PR)
    3. eslint-plugin-mocha-cleanup (has PR)

To-dos

changelog

eslint-config-ash-nazg CHANGES

36.22.2

  • fix: overrides issue

36.22.1

  • fix: mocha issue

36.22.0

  • fix: great eye node
  • chore: update deps. and devDeps.

36.21.0

  • fix: disable redundant sonarjs/no-unused-expressions
  • chore: update deps. and devDeps.

36.20.1

  • fix: cypress issue

36.20.0

  • chore: update deps.

36.19.0

  • feat: caughtErrors: none for no-unused-vars

36.18.1

  • fix: apply no-implicit-globals rule only if in browser

36.18.0

  • fix: apply lexicalBindings option only for no-implicit-globals if in browser
  • fix: ensure great eye passes on args
  • chore: update deps.

36.17.1

  • fix: properly disable overly aggressive sonarjs rules
  • fix: point to types properly

36.17.0

  • chore: update deps.
  • fix: properly disable overly aggressive sonarjs rules

36.16.3

  • fix: properly disable overly aggressive sonarjs rules

36.16.2

  • fix: properly disable overly aggressive sonarjs rules

36.16.1

  • fix: properly disable overly aggressive sonarjs rules

36.16.0

  • feat: disable overly aggressive sonarjs rules

36.15.1

  • fix: Node detection for requireFlag

36.15.0

  • feat: disable overly aggressive sonarjs rules

36.14.1

  • fix: disable problematic sonarjs/sonar-no-fallthrough rule

36.14.0

  • feat: conditional requireFlag on require-unicode-regexp
  • feat: update deps.

36.13.0

  • feat: switch to renamed markdown plugin
  • chore: update deps.

36.12.0

  • chore: update deps.

36.11.1

  • fix: disable escompat rules for (Node) overrides files

36.11.0

  • feat: add lintAllEsApis setting for eslint-plugin-compat
  • feat: disable @brettz9/no-use-ignored-vars

36.10.0

  • feat: disable unicorn/no-anonymous-default-export for module overrides
  • chore: update eslint-plugin-escompat, eslint-plugin-jsdoc

36.9.0

  • feat: loosen some restrictive mocha rules
  • chore: uninstall eslint-plugin-chai-assert-bdd

36.8.6

  • fix: plugins to include n in overrides

36.8.5

  • fix: make explict that strict is global
  • fix: avoid chai globals

36.8.4

  • fix: avoid certain mocha globals that are now imported
  • fix: restate sourceType: "script" for script-node

36.8.3

  • fix: change cypress/integration to cypress/e2e

36.8.2

  • fix: ensure scripts includes require, __dirname and __filename

36.8.1

  • fix: ensure no-restricted-imports is off for Node configs (for cases inheriting bare config)
  • fix: for overrides config, ensure __dirname and __filename are disabled for modules
  • fix: for scripts, ensure module and exports are at least defined

36.8.0

  • feat: add to default Node/default browser folder overrides
  • chore: update deps.

36.7.0

  • fix(TS): avoid deprecated types

36.6.0

  • feat: update Unicorn (uses new rule: no-length-as-slice-end)

36.5.0

  • feat: add strict option for promise/prefer-await-to-then
  • chore: update deps.
  • fix: name tweaks

36.4.1

  • fix: prioritize browser config over cypress (latter has earlier ecmaVersion)

36.4.0

  • feat: adds escompat

36.3.1

  • fix: avoid certain Promise rules in Cypress

36.3.0

  • fix: remove/change deprecated rules

36.2.1

  • fix: add one missing name

36.2.0

  • feat: add name to further configs
  • chore: bump semver and @brettz9/eslint-plugin

36.1.0

  • feat: add name to configs
  • fix: disable import/unambiguous in Cypress

36.0.4

  • fix: disable import rule usage in great-eye
  • fix: ensure great-eye is not used when sauron indicated

36.0.3

  • fix: add server.js to auto-Node files

36.0.2

  • fix: apply Cypress rules to all of cypress subdirectories
  • fix: ensure Node applied to Node RC scripts

36.0.1

  • fix: ensure when Node not included that modules does not reference Node rules

36.0.0

BREAKING CHANGE:

Requires Node 18.20.3+

Now to use the main config which is now a function accepting an array of combinations of the following (and a second optional config for the babel option):

"great-eye"|"sauron"|"saruman"|"polyglot"|"bare"|"node"|"browser"| "script"|"module"|"no-overrides"|"no-cypress"|"mocha"|"babel"| "third-party"

Was not able to complete reinclusion for the following due to lack of flat config or ESLint 9 support:

  1. eslint-plugin-import
  2. eslint-plugin-escompat (now added)
  3. eslint-plugin-unsanitized
  4. @fintechstudios/eslint-plugin-chai-as-promised
  5. eslint-plugin-mocha-cleanup

Renamed rc config to overrides.

Throws if not encountering a browserslist in package.json when using the main browser config.

Adds rules to overrides for folders, treating folders like public or browser as calling for the browser config. Applies more to the (auto-Node-based) build config.

Auto-applies overrides and cypress by default.

Renamed third-party config to third-party.js.

Possibly other changes.

  • feat: switch to flat config
  • feat: add bare and polyglot configs
  • chore: update globals, semver
  • chore: some TS work
  • feat: detects sourceType automatically for .js files too, based on package.json
  • fix: drop no-unpublished-import checks from rc configs
  • fix: add eslint.config.js to ESM configs

35.4.0

  • chore: bump devDeps/peerDeps.

35.3.0

  • chore: bump devDeps/peerDeps.

35.2.0

  • feat(tighten): update unicorn to 50.0.0
  • chore: bump devDeps/peerDeps.

35.1.0

  • feat(loosen): switch to markers for @stylistic/spaced-comment
  • chore: bump peerDeps/devDeps

35.0.0

  • chore: switch to use stylistic and internal standard (build script is seeing imports as unused despite being used)

34.18.0

  • chore: bump peerDeps/devDeps

34.17.1

  • fix: update peers.

34.17.0

  • feat(index.js): add no-object-constructor
  • chore: bump peerDeps/devDeps

34.16.0

  • chore: bump semver, peerDeps/devDeps

34.15.0

  • chore: bump peerDeps/devDeps (including new rule from jsdoc)

34.14.0

  • chore: bump peerDeps/devDeps

34.13.0

  • chore: bump semver and peerDeps/devDeps

34.12.0

  • chore: Update devDeps/peerDeps. (including new rules from Unicorn and jsdoc)

34.11.1

  • fix: bump peer for eslint-plugin-jsdoc

34.11.0

  • chore: update semver, devDeps.
  • fix(index.js): change tag-lines to startLines: null to keep old behavior

34.10.0

  • chore: update semver
  • refactor: disable new, unused JSDoc rules

34.9.1

  • fix: add missing cjs extensions to rc.js

34.9.0

  • chore: update devDeps/peerDeps.

34.8.0

  • chore: update devDeps/peerDeps.
  • chore: use new ESLint config package

34.7.1

  • fix: update peerDeps.

34.7.0

  • feat(index.js): enable new import/no-empty-named-blocks
  • feat(explicitly-unused.js): disable new import/consistent-type-specifier-style rule
  • chore: update devDeps/peerDeps.

34.6.0

  • chore: update devDeps/peerDeps.

34.5.0

  • feat(index.js): disable a few new Unicorn rules (inherting one other)

34.4.0

  • feat(index.js): add new built-in rules
  • feat(explicitly-unused.js): disable new unused jsdoc rule
  • chore: update devDeps.

34.3.0

  • feat(index.js): add Promise plugin's no-multiple-resolved
  • chore: update devDeps/peerDeps.

34.2.0

  • feat(explicitly-unused.js): mention new ESLint rule
  • feat(index.js): disable new Unicorn recommended rule and allow no-unnecessary-await
  • chore: update semver, devDeps/peerDeps.

34.1.0

  • chore: Update devDeps/peerDeps.

34.0.0

  • chore: Update devDeps/peerDeps. (including new rule from Unicorn)
  • chore(BREAKING): Update to Node 14.19.1

33.1.0

  • feat(index.js): add new no-constant-binary-expression rule
  • chore: Update devDeps/peerDeps.

33.0.0

  • feat: update eslint-config-standard and per this change, use eslint-plugin-n in place of eslint-plugin-node

32.14.0

  • feat: web-ext-config.js file as CJS
  • chore: Update devDeps/peerDeps.

32.13.0

  • feat(index): support @uce as virtual module

32.12.0

  • fix(sauron): prevent object<> lower-case

32.11.0

  • fix(sauron): do allow object for now with preferredTypes

32.10.0

  • fix(index, sauron): realign preferences for Object, etc., and exempting in @typedef

32.9.0

  • fix: Drop preference for PlainObject; use TypeScript-compatible JS

32.8.0

  • feat: Update devDeps/peerDeps. (including new rules from Unicorn, a couple of which are disabled here)
  • feat(index.js): add virtual @uce/reactive to import/no-unresolved
  • feat(explicitly-unused.js): add prefer-json-parse-buffer
  • refactor: revert Atom release; code not helpful

32.7.1

  • fix: bug in undefined check

32.7.0

  • feat: Attempt Atom-friendly release
  • npm: Update devDeps/peerDeps.

32.6.0

  • npm: Update devDeps/peerDeps.

32.5.0

  • Restore sonarjs/no-inverted-boolean-check despite now removal from sonarjs recommended
  • npm: Update devDeps/peerDeps. (including update from sonarjs)

32.4.0

  • npm: Update devDeps/peerDeps. (including new rule from Unicorn)
  • Update [explicitly-unused.js]: Add new jsdoc/sort-tags

32.3.0

  • npm: Update devDeps/peerDeps. (including new rules from Unicorn)

32.2.0

  • Update [explicitly-unused.js]: Add eslint rule
  • npm: Update devDeps/peerDeps.

32.1.0

  • Enhancement [index.js] (tighten): Add Unicorn's no-empty-file and prefer-code-point
  • npm: Update devDeps/peerDeps.

32.0.0

  • Breaking change: Disables jsdoc/check-examples due to it not yet working in ESLint 8 (should re-enable when supported)
  • Enhancement [index.js] (tighten): Add new ESLint core no-unused-private-class-members rule
  • Enhancement [index.js] (tighten): Add unicorn no-invalid-remove-event-listener and no-useless-fallback-in-spread rules
  • Build: Use native ESM
  • npm: Update devDeps/peerDeps.

31.2.2

  • npm: Update devDeps/peerDeps.

31.2.1

  • Fix [index.js] (loosen): Disable unicorn/prefer-object-from-entries

31.2.0

  • Enhancement [sauron.js] (tighten): Add forceReturnsWithAsync
  • npm: Update devDeps./peerDeps. (new Unicorn rules)

31.1.1

  • Fix: For untyped Promise messages, fix casing of "any"
  • Fix: Clarify that replacing Array could also point to specific array type
  • Fix: update devDeps./peerDeps (jsdoc patch)

31.1.0

  • Enhancement [great-eye.js] (tighten): set hoist: 'all' for no-shadow
  • npm: Update devDeps./peerDeps.

31.0.0

  • Enhancement [sauron.js] (tighten): Set lexicalBindings to true to avoid browser globals
  • npm: Update devDeps./peerDeps.

30.1.0

  • npm: Update devDeps./peerDeps. (new SonarJS rules)

30.0.1

  • Fix: Missing eslint-plugin-sonarjs under peerDependencies
  • npm: Update devDeps./peerDeps. (Unicorn patch)

30.0.0

  • Breaking change: Restore using eslint-plugin-sonarjs which is again being actively updated/maintained.

29.18.0

  • Enhancement (index.js) [loosen]: Disable somewhat cumbersome unicorn/prefer-prototype-methods
  • npm: Update devDeps./peerDeps. (new Unicorn rules)

29.17.1

  • Fix (node.js) [loosen]: Disable node/file-extension-in-import

29.17.0

  • Enhancement (great-eye.js) [tighten]: Expect unicorn/prefer-object-has-own
  • npm: Update devDeps./peerDeps. (new unicorn rules)

29.16.2

  • npm: Require latest eslint-plugin-markdown (without vulnerabilities)

29.16.1

  • npm: Require latest eslint-config-standard patch

29.16.0

  • npm: Update devDeps./peerDeps. (adds new jsdoc rules)

29.15.0

  • npm: Update peerDeps/devDeps

29.14.0

  • Enhancement (index.js) [tighten]: Add jsdoc/require-asterisk-prefix
  • npm: Update peerDeps/devDeps (brings in unicorn/no-document-cookie rule)

29.13.0

  • npm: Update peerDeps/devDeps

29.12.1

  • Fix (index.js) [loosen]: Allow fs/promises

29.12.0

  • Enhancement (index.js) [loosen]: Disable new Unicorn prefer-module and prefer-node-protocol rules
  • npm: Update peerDeps/devDeps
  • npm: Add lint script

29.11.0

  • npm: Update peerDeps/devDeps

29.10.1

  • Fix (+script-node.js) [loosen]: Disable no-process-exit which the Node plugin adds
  • npm: Update peerDeps/devDeps

29.10.0

  • npm: Update peerDeps/devDeps

29.9.0

  • Enhancement (index.js) [tighten]: Add Unicorn's no-static-only-class
  • Enhancement (index.js) [loosen]: Make explicit avoidal of Unicorn's new prefer-array-flat until Node 12
  • npm: Update semver and peerDeps/devDeps.

29.8.2

  • npm: Remove now redundant eslint-plugin-standard

29.8.1

  • Fix (rc.js and overrides): apply to .mocharc.js

29.8.0

  • Fix (sauron-node-script/+script-node.js): Add globalReturn: true
  • npm: Update peerDeps/devDeps.

29.7.0

  • Enhancement (mocha.js): Add expect, assert, should globals.
  • Enhancement (mocha-plus.js): Add chai-assert-bdd plugin

29.6.0

  • Enhancement (node.js) [tighten]: Resume adding import/dynamic-require as node/global-require doesn't flag dynamic global requires

29.5.0

  • Fix: Override .ncurc.js, .3rdparty-eslintrc.js, and **/jsdoc-config.js
  • Add experimental configs rc-module.js and rc-script.js

29.4.0

  • Enhancement (node.js) [loosen]: Add node/global-require and instead drop import/no-dynamic-require as the redundant one (didn't seem as accurate)

29.3.0

  • Enhancement [sauron-script-overrides.js]: Add new config
  • npm: Update peerDeps/devDeps.

29.2.0

  • Enhancement [rc.js] (loosen): Disable compat/compat for RC/build files; check .eslintrc.cjs also

29.1.0

  • Enhancement [rc.js] (loosen): Disable node/no-unpublished-import for config and build directory files
  • Refactoring [node.js]: Disable node/no-missing-import as redundant with import/no-unresolved
  • npm: Add prepublishOnly script

29.0.0

  • npm: Update devDeps/peerDeps (to allow rc.js and its targeting of Markdown per eslint-plugin-markdown's 2.0 use of ESLint 7's new processor API to be used alongside the updated eslint-plugin-jsdoc with its linting of @example according to the expectations of the same ESLint 7 processor API)

28.0.1

  • Fix (rc.js): Ensure properly using new Markdown API
  • Docs: Mention inclusion of "md" in ---ext if latter is explicit

28.0.0

27.0.1

  • Fix: Avoid postinstall script which causes problems for non-pnpm dependents

27.0.0

  • Switch from @mysticatea to @brettz9 fork (fixes and simplifies peerDependencies and removes extra code)
  • Enhancement (index.js) [loosen]: Disable sometimes cumbersome unicorn/consistent-destructuring
  • Enhancement (index.js) [loosen]: Add shared-node-browser env for polyglot-friendly globals (other globals specific to envrionment are not whitelisted); to actually prevent these, will now need to set shared-node-browser env to false.
  • Enhancement (node.js) [loosen]: Drop node/global-require as redundant with import/no-dynamic-require
  • Enhancement (node.js): Based on engines: {node} set env: {node: true, es20XX: true} (extra ES globals as relevant to Node version), parserOptions ecmaVersion
  • pnpm: Switch to pnpm
  • npm: Bump semver; peerDeps/devDeps.
  • npm: Bump engines to Node 10

Experimental additions:

  • Enhancement (+script-node.js): Add file for applying script source type with Node; used by sauron-node-script
  • Enhancement (+script.js): Add file for applying script source type for non-Node; used by sauron-script
  • Enhancement (sauron-node-overrides.js): sauron-node with rc and mocha
  • Enhancement (sauron-node-script-overrides.js): sauron-node-script with rc and mocha
  • Enhancement (sauron-overrides.js): sauron with rc and mocha
  • Enhancement (sauron-script.js): sauron with +script.js file
  • Enhancement (+babel.js): Add file for wrapping a module to support equivalent babel/eslint-parser rules
  • Enhancement (mocha.js): Sets up Mocha (and chai global) on test directories (via overrides)
  • Enhancement (mocha-plus.js): Strict but reasonable rules for checking Mocha/Chai (not naming "sauron" as not bundling with Sauron)
  • Enhancement (cypress.js): Strict but reasonable rules for checking Cypress
  • Enhancement (rc.js): Add config for using overrides to give Rollup and RC config files to support modules where available (and script where not)
  • Refactoring (sauron-node-script.js): Use new +script-node.js file

26.1.0

  • npm: Update peerDeps/devDeps.

26.0.0

  • Breaking enhancement: Switch from SonarJS to Radar, a maintained fork which doesn't warn when using ESLint 7 for peerDependencies. Changes inherited-rules/implicitly-included/sonars-recommended.js to inherited-rules/implicitly-included/radar-recommended.js

25.1.0

  • Enhancement: Enforce type on yields

25.0.0

  • Enhancement [index.js] (tighten): Update new jsdoc and Unicorn rules, though disable unicorn/no-array-for-each
  • Enhancement [great-eye.js] (tighten): Prevent plain use of even subclassed Promise<> to instead use an interface where the specific resolver and rejector can be documented.
  • npm: Update peerDeps/devDeps.

24.0.0

  • Enhancement [index.js] (tighten): Uses all new Unicorn 26.0.0 rules
  • remark: remove remarkrc
  • npm: Update peerDeps/devDeps.

23.0.0

  • Enhancement [index.js] (tighten): Add no-nonoctal-decimal-escape and no-unsafe-optional-chaining
  • Enhancement [index.js] (tighten): Add unicorn/prefer-array-some, unicorn/prefer-date-now, unicorn/prefer-default-parameters
  • Enhancement [index.js] (tighten): Use renamed Unicorn rules
  • Enhancement [index.js]: Avoid new Unicorn rules no-lonely-if and empty-brace-spaces
  • Update [explicitly-unused.js]: Add renamed Unicorn rules
  • npm: Update peerDeps/devDeps.

22.10.0

  • Enhancement [index.js]: Apply latest standard; remove now unneeded standard/no-calback-literal, no-negated-in-lhs
  • Enhancement [explicitly-unused.js]: Remove disabling of node/no-callback-literal (rule now used)
  • npm: Update peerDeps/devDeps.

22.9.0

  • Enhancement [index.js]: Add checkDefaults, checkParams, and checkProperties to jsdoc/check-examples rule
  • Enhancement [great-eye.js]: Add unicorn/numeric-separators-style (but disable in index.js)
  • npm: Update peerDeps/devDeps.

22.8.0

  • npm: Update peerDeps/devDeps.
  • Update: Disable new Unicorn and jsdoc rules

22.7.0

  • npm: Update peerDeps/devDeps.

22.6.0

  • Enhancement [index.js] (Tighten): Add Unicorn rules no-object-as-default-parameter and prefer-array-find; add back prefer-flat-map
  • npm: Update peerDeps/devDeps.

22.5.1

  • npm: Update peerDeps/devDeps.

22.5.0

  • Enhancement [index.js] (Tighten): Add no-promise-executor-return, no-unreachable-loop
  • npm: Update peerDeps/devDeps.

22.4.0

  • Enhancement [sauron.js] (Tighten): Add jsdoc/require-throws
  • npm: Update peerDeps/devDeps.

22.3.0

  • Enhancement [sauron.js] (Tighten): Add eslint-comments/require-description
  • Linting: As per latest sauron
  • npm: Update peerDeps/devDeps.

22.2.0

  • Enhancement: [index.js] (Tighten): Add no-loss-of-precision.
  • npm: Update peerDeps/devDeps.

22.1.0

  • Update [index.js]: Disable new Unicorn recommended rules
  • npm: Update devDeps/peerDeps.
  • npm: Remove explicit reference to new ESLint 7 recommended rules (will automatically be set)

22.0.0

  • Enhancement [index.js] (tighten): Add default-case-last and no-useless-backreference
  • Update [explicitly-unused.js] (loosen): Add disabled no-restricted-exports (ESLint 7 rule)
  • npm: Update devDeps/peerDeps

21.0.0

  • Update [index.js]: Disable new unicorn/no-null
  • Docs: Update explanation for regex-shorthand
  • npm: Update devDep./peerDep. (unicorn)

20.0.0

  • npm: Update devDeps/peerDeps

19.0.0

  • Breaking change/Update: Move Node-specific rules out of index.js into node.js (but as (non-deprecated) eslint-plugin-node equivalents to ESLint rules)
  • Update [explicitly-unused.js]: Add (disabling of) new project-specific eslint-plugin-node rules
  • Enhancement: Add new sauron-node-script which overrides use of Modules to allow CommonJS
  • Refactoring: Simplify by included new recommended configs of sonarjs and no-use-extend-native
  • npm: Update devDeps/peerDeps

18.0.0

  • Enhancement [sauron.js] (tighten): Add unicorn/prefer-number-properties
  • Enhancement [great-eye.js] (tighten): Add unicorn/unicorn/prefer-set-has
  • Maintenance: 4 sp. for MD files
  • npm: Update devDeps./peerDeps.

17.5.0

  • Enhancement [index.js] (loosen): Surface standard's reasonable dropping of 'no-return-await (and add to explicitly-unused).
  • npm: Update devDeps./peerDeps.

17.4.0

  • Update [explicitly-unused.js]: Add unicorn/string-content and deprecated unicorn/regex-shorthand
  • Enhancement [index.js] (tighten): Add recommended unicorn/better-regex but with option sortCharacterClasses set to false
  • Optimization: Use strict mode
  • Linting: Switch to single quotes; fix indent; add ignore file
  • npm: Update devDep/peerDep (unicorn) and package-lock.json

17.3.0

  • npm: Update devDeps/peerDeps

17.2.0

  • Enhancement [sauron.js] (tighten): Offer replacements for function and array lower-cased
  • npm: Update devDeps

17.1.0

  • Fix: Disable Unicorn prefer-exponentiation-operator with proper name
  • npm: Update peerDeps/devDeps

17.0.0

  • Enhancement [sauron.js] (tighten): For jsdoc/require-jsdoc, target ClassDeclaration, ClassExpression, MethodDefinition in addition to FunctionDeclaration
  • npm: Update peerDeps/devDeps

16.5.0

  • Enhancement [index.js] (tighten): Add jsdoc/no-bad-blocks
  • Update: Add jsdoc/no-defaults
  • npm: Update peerDeps/devDeps

16.4.0

  • Enhancement [index] (change): Remove matchingFileName option on jsdoc/check-examples in favor of new default which follows path of containing file, though still with ".md" extension
  • npm: Update peerDeps/devDeps

16.3.0

  • Enhancement [sauron] (tighten): Added contexts: ['any'] for require-param-name, require-param-type, and require-returns-type so as to document virtual functions (e.g., with @implements)
  • Enhancement [sauron] (tighten): Added implements-on-classes with contexts: ['any']
  • npm: Update peerDeps/devDeps

16.2.0

  • Enhancement [great-eye] (tighten): Add jsdoc/require-property-description
  • Enhancement [index] (tighten): For match-description, add with contexts: ['any']
  • Docs: Explain exclusions

16.1.0

  • Enhancement [index.js] (tighten): Now includes jsdoc plugin update, with check-property-names, require-property, require-property-name, require-property-type rules (though disabling require-property-description and avoiding require-file-overview).
  • Enhancement [index.js] (loosen): Add exemptTagContexts option for typedef with object or PlainObject (so can have as a base type without complaint)
  • npm: Fix build to properly remove files (no current effect)
  • npm: Update peerDeps/devDeps

16.0.0

  • npm: Update peerDeps/devDeps (including breaking node plugin change)

15.0.0

  • Enhancement [index.js] (tighten): Now includes unicorn/prefer-modern-dom-apis by inheritance
  • Enhancement [index.js] (loosen): Now excludes require-atomic-updates which was problematic
  • Docs: Clarify some missing or misplaced descriptions for rationales on disabled rules
  • Enhancement [explicitly-unused.js]: Add lines-between-class-members and require-atomic-updates
  • npm: Update peerDeps/devDeps

14.0.3

  • Fix: Disable no-process-exit in Node config

14.0.2

  • Fix (loosen): Disable no-process-exit since unicorn/no-process-exit allows in CLI apps

14.0.1

  • Fix: Ensure eslint-plugin-no-unsanitized is added as a peerdep.

14.0.0

  • Enhancement [sauron.js] (tighten): Add new eslint-plugin-no-unsanitized rules
  • npm: Update devDeps/peerDeps

13.1.0

  • Enhancement [index.js] (loosen): Disable regex-shorthand until such time as it may provide option not to sort character classes
  • npm: Update devDeps/peerDeps

13.0.0

  • Enhancement [index.js] (tighten): Add new unicorn rules (prefer-negative-index, prefer-trim-start-end)
  • npm: Update devDeps/peerDeps

12.0.0

  • Enhancement [index.js] (tighten): Add new eslint rules (grouped-accessor-pairs, no-constructor-return, no-dupe-else-if, no-setter-return, prefer-exponentiation-operator)
  • Change: Disabled unicorn/prefer-exponentiation-operator in favor of now built-in prefer-exponentiation-operator
  • npm: Update devDeps/peerDeps

11.5.0

  • npm: Update peerDeps/devDeps

11.4.0

  • Enhancement [index.js] (tighten): By update, gain new eslint-plugin-jsdoc rules
  • Maintenance: Add .editorconfig
  • npm: Update peerDeps/devDeps

11.3.0

  • Enhancement [index.js] (tighten): By update, gain new sonarjs rules: no-collection-size-mischeck no-redundant-jump, no-same-line-conditional, no-unused-collection
  • npm: Update peerDeps/devDeps

11.2.0

  • Enhancement [sauron] (tighten): Ensure checking Object
  • npm: Update peerDeps/devDeps

11.1.0

  • Refactoring [node]: Remove redundant plugins: ['node'] (recommended config already includes)
  • Linting: Dog food our own linting rules
  • Docs: Mention use of plugin:node/recommended-script
  • npm: Update peerDeps/devDeps

11.0.1

  • Fix [index.js]: Ensure is enforcing "single" for quotes

11.0.0

  • Enhancement [index.js] (loosen): Change quotes from standard approach to add settings avoidEscape: true and allowTemplateLiterals: true.
  • npm: update peerDeps/devDeps

10.0.0

  • Enhancement [sauron] (tighten) Add Unicorn prefer-string-slice rule

9.0.1

  • Fix: Remove unicorn/consistent-function-scoping as prematurely added

9.0.0

  • Breaking change: Require >= node 8.10.0
  • Enhancement [index.js] (tighten): Add new rules: default-param-last, no-import-assign, prefer-regex-literals
  • Enhancement [index.js] (tighten): Inherit new rules from unicorn: prefer-dataset, prefer-reflect-apply
  • Enhancement [index.js]: unicorn/expiring-todo-comments but allowing for no conditions
  • Enhancement [index.js]: Add no-warning-comments with terms set to fixme and xxx so as to block these (in favor of todo)
  • Enhancement [great-eye]: unicorn/expiring-todo-comments and insisting on conditions
  • Enhancement [sauron]: unicorn/consistent-function-scoping
  • Testing: Compare to es2020
  • npm: Bump @mysticatea/eslint-plugin, eslint-plugin-jsdoc, eslint-plugin-unicorn, typescript, eslint devDeps/peerDeps

8.9.0

  • Enhancement [index.js]: Update node plugin with recommended update; adds node/no-exports-assign
  • npm: Update devDeps/peerDeps

8.8.0

  • Update: Avoid node/no-callback-literal which duplicates standard/no-callback-literal
  • npm: Update devDeps/peerDeps

8.7.0

  • Enhancement [index.js] (tighten): remove rule function-call-argument-newline (oppressive)

8.6.0

  • Enhancement [index.js] (tighten): apply rule function-call-argument-newline set to never
  • Enhancement [index.js]: apply rule no-label-var for comparison purposes (though already a part of eslint:recommended)
  • Enhancement [index.js]: Disable object-curly-newline since added to "standard"
  • npm: Update devDeps/peerDeps

8.5.2

  • npm: Update peer and devDeps (including import, jsdoc, and unicorn plugins)

8.5.1

  • Fix: Avoid use of now removed template variables in messages calling for replacement

8.5.0

  • npm: Update eslint-plugin-jsdoc

8.4.0

  • Change: [index.js]: Explicitly reject items if we inherit from mysticatea
  • Enhancement: Add eslint-conf_eslint-all.js for showing non-eslint-recommended rules (e.g., by standard)
  • Build: Update "standard" and eslint-recommended comparison files as "standard" now incorporates more recommended rules (and removes a few of its own redundant ones)
  • Build: Only check explicitly-unused rules in comparison with unused, not with inherited, as need to see which explicitly unused rules may later become used
  • Build: Ensure removing files before testing
  • npm: Bump peerDeps/devDeps
  • Fix [index.js]: Disable lines-between-class-members as inherited now from standard

8.3.0

  • npm: Bump eslint-plugin-jsdoc, typescript devDeps/peerDeps

8.2.0

  • npm: Bump eslint-plugin-jsdoc devDep/peerDep

8.1.0

  • npm: Update eslint-plugin-jsdoc and move from settings to options accordingly; document choice of options

8.0.3

  • npm: Bump eslint-plugin-jsdoc for dep. fix

8.0.2

  • npm: Bump eslint-plugin-jsdoc (getting latest jsdoctypeparser for jsdoc type improvements)

8.0.1

  • Fix (jsdoc) [sauron]: object and Array preferredTypes were reporting parents instead of children
  • Refactoring: Remove trailing commas

8.0.0

  • Breaking change [index.js]: require @extends in place of @augments
  • Breaking change [sauron]: preferredTypes to prefer Typescript-friendly any instead of Any
  • Change [index.js]: Reorder extends (what should be backward-compatibly) and avoid adding to plugins except where needed
  • Change [index.js]: Make explicit deriving from promise/recommended, import/recommended, and jsdoc/recommended, though disabling rules we don't want (and removing some explicit rule additions which are now inherited); though not currently deriving from its es2019 config, we are disabling some @mysticatea/eslint-plugin rules, as though we were inheriting only those rules which it doesn't inherit from other plugins/configs. In the absence of inheriting the config, we are also therefore adding some of its rules manually. Should be backward-compatible.
  • Update [*]: Fix config extension paths for ESLint 6

  • Fix [index.js] (tighten): Ensure no-use-extend-native is being applied

  • Fix [explicitly-unused.js]: Remove those which were (or now are) in other configs like sauron

  • Enhancement [index.js] (tighten): Add plugin with its recommended rules (sonarjs), disabling some

  • Enhancement [index.js] (tighten): Add eslint-plugin-html plugin (though need to enable for HTML, e.g., --ext .js,.md,.html)
  • Enhancement [index.js] (tighten): Add plugin array-func/all with its all rules (though disabling array-func/prefer-array-from for now)
  • Enhancement [sauron] (tighten): Add prefer-named-capture-group
  • Enhancement [great-eye] (tighten): Add max-statements, import/no-unused-modules, and sonarjs/cognitive-complexity
  • Enhancement [great-eye] (tighten): Add import/no-unused-modules (with missingExports and unusedExports)
  • Enhancement [great-eye-node]: Add new config which expands on great-eye and sauron-node
  • Enhancement [explicitly-unused.js]: Add unused @mysticatea and eslint-comments items and some deprecated rules
  • Enhancement [inherited-rules/implicitly-included]: Add these auto-built configs to track rules that were inherited (and not disabled)
  • Enhancement [inherited-rules/unused]: Add space for these auto-built configs (currently none) to track if there are any rules in the plug-ins and configs we have extended but have not either incorporated or explicitly rejected.

  • Linting: Fix .eslintrc error

  • Docs: Indicate how to find which rules were inherited or rejected and to calculate if any inherited ones are missing from our lists; some doc fixes
  • npm: Update devDeps, peerDeps

7.0.1

  • Fix: For Promise, was reporting parents instead of children

7.0.0

  • Tighten: Require Promise to have a type
  • Tighten: Add rules, unicorn/prefer-event-key and unicorn/prefer-flat-map
  • Tighten: Disallow .<> syntax in favor of <> syntax
  • npm: Update unicorn, jsdoc, typescript peerDeps/devDeps

6.1.1

  • Fix: Issue in formatting of settings.jsdoc

6.1.0

  • Change: Prefer not having allowAugmentsExtendsWithoutParam setting or its recommended replacement
  • Refactoring: Remove now default config
  • npm: Update import (patch), jsdoc (feature) plugins

6.0.1

  • npm: Update devDep

6.0.0

  • Breaking change: Node minimum 6.0.0
  • Tighten (great-eye): Add preferredTypes
  • Tighten (sauron): Add forceRequireReturn and preferredTypes
  • Tighten: Add require-returns-check
  • Loosen: allowOverrideWithoutParam, allowImplementsWithoutParam, allowAugmentsExtendsWithoutParam all true by default
  • Tighten: Set rejectExampleCodeRegex to ^` to allow avoiding example
  • Change: Set matchingFileName to dummy.md so that it will match any Markdown rules by default
  • Change (great-eye): Switch from require-jsdoc to jsdoc/require-jsdoc (former is deprecated);
  • Remove valid-jsdoc in favor of corresponding eslint-plugin-jsdoc config
    • Breaking changes relative to valid-jsdoc as used previously:
      • jsdoc/check-types - Per new defaults, use object instead of Object
      • jsdoc/require-returns: true only in sauron and as warning
      • jsdoc/require-returns-type and jsdoc/require-param-type are only warnings
      • jsdoc/match-description: Now allowing backtick or digits at beginning of jsdoc descriptions
  • Integrate eslint-plugin-jsdoc 7.0.0 (listing features/breaking changes only and only apply if we add by default or if you enable the rule) which:
    • Breaking change: Drops Node v4 support; minimum 6.0.0; updated devDeps, eslint peer dep to >= 5.16.0 (from >= 4.14.0)
    • Breaking change: Add meta.type (usable by --fix-type) and meta.schema (enforces schema on options) to rules
    • Breaking change: check-types now expects "object" instead of "Object"
    • check-examples: Change behavior to also check classes
    • check-types and no-undefined-types: utilize settings.jsdoc.preferredTypes map
    • check-types: Add option object with noDefaults
    • implements-on-classes: Add rule to prevent @implements on non-constructor functions
    • match-description: Added rule (see valid-jsdoc note above)
    • no-types: Add rule to prevent types on @param/@returns
    • no-undefined-types: Consider Node.js/Commonjs as module (including variables in module scope as well as global)
    • no-undefined-types now automatically allows NaN and Infinity types
    • no-undefined-types: Add option object with preferredTypesAreDefined and definedTypes
    • no-undefined-types, only check tags expected to have types (as with check-types) or, for valid-types, tags expected to have types or namepaths
    • require-description: Add options contexts and noDefaults to allow additional contexts (e.g., ClassDeclaration)
    • require-example: Implement avoidExampleOnConstructors setting; also skip if possesses inheritdoc/override
    • require-hyphen-before-param-description: check param tagNamePreference setting
    • require-jsdoc: exempt empty functions option
    • require-param: ignorePrivate setting
    • require-returns, require-returns-check, and require-jsdoc: Treat async functions as returning a value (since they return Promises)
    • require-returns: Allow presence of @interface to avoid need for @returns (as @interface implies a class); Allow presence of ES setter to avoid need for @returns as setters don't return
    • require-returns: forceRequireReturns setting
    • require-returns: Avoid reporting when @implements is present
    • require-returns-check: If a return is documented, allow @class and @interface (as with @constructor) to ignore reporting a missing return in body as constructors implicitly return the class; for testing, add getter check
    • require-return-checks: Prevent from erring within @virtual/@constructor and class constructor
  • npm: Update eslint-plugin-node

5.0.0

  • Integrate eslint-plugin-jsdoc 4.8.4 which allows:
    1. (Tighten): For jsdoc/check-types, check undefined and null for casing
    2. (Tighten): Add jsdoc/require-jsdoc rule (to great-eye only)
    3. (Tighten): For jsdoc/valid-types, check namepath type tags for empty or invalid namepaths
    4. (Loosen): Support @memberof! with jsdoc/check-tag-names
    5. This is not in effect, but the rule jsdoc/no-undefined-types will loosen the types undefined and null, and check a variety of tags which define names (e.g., @class).

4.0.0

  • Tighten: Apply plugin:node/recommended-module rules, bringing node/no-unsupported-features/es-syntax with ignores: ["modules"], node/no-unpublished-import, node/no-deprecated-api, node/process-exit-as-throw.
  • Tighten: Add new Node rule node/file-extension-in-import
  • Tighten: Add node/prefer-promises/dns and node/prefer-promises/fs in sauron-node
  • Loosen: Remove no-process-exit to node-based rules only
  • npm: Update eslint-plugin-node, eslint-plugin, js-yaml

3.0.1

  • npm: Add typescript and plugins node/standard to peerDeps
  • npm: Add typescript as devDep

3.0.0

  • License: Add file (MIT)
  • npm devDep: import, eslint-plugin

2.0.0

  • Fail for new check-syntax (Closure-specific syntax)
  • Sauron only: jsdoc/require-returns warning
  • Make explicit lack of acceptance of jsdoc/check-alignment and jsdoc/check-indentation except in the ash-nazg/great-eye

1.0.2

  • Fix: Mistakenly enabled rather than disabled prevent-abbreviations

1.0.1

  • Fix: Omitted actual prevent-abbreviations disabling

1.0.0

  • Change (tighten, loosen): Updated eslint-plugin-compat to 3.1.0
  • Change (tighten, loosen): Updates Unicorn to 8.0.1, though disabling prevent-abbreviations except in the great-eye subconfig
  • Docs (README): List dependencies alphabetically in list, lb
  • npm: Update devDeps

0.5.0

  • Change (loosen): Disable cumbersome @mysticatea/no-use-ignored-vars

0.4.4

  • Change (loosen): For eslint-comments/disable-enable-pair, set option allowWholeFile to true

0.4.3

  • Change: Avoid unicorn/no-unreadable-array-destructuring rule
  • Docs: Update explicit listing per jsdoc changes
  • Docs: Explain missing included rules

0.4.2

  • Fix: Try to workaround problem with recommended comments plugin

0.4.1

  • Fix: Add missing eslint-plugin-eslint-comments devDep/peerDep

0.4.0

  • Enhancement: Add some rules from @mysticatea/eslint-plugin
  • npm: Update devDeps/peerDeps

0.3.0

  • Breaking change: Move rules (capitalized-comments, complexity, no-magic-numbers, no-warning-comments) to new config ash-nazg/great-eye (and add max-statements-per-line and no-plusplus as well as jsdoc rules require-description, require-param-description, require-returns-description and require-example)
  • Fix: Though not a package, lint explicitly-unused.js file
  • Linting: Fix indent, tab
  • npm: Add ESLint config and script for project itself (using double quotes given JSON-ish style)
  • npm: Update to versioned eslint-plugin-jsdoc
  • npm: Update devDep

0.2.0

  • Enhancement: Add no-restricted-syntax with [operator=instanceof] to forbid use of instanceof (which, unless one is using Symbol.hasInstance, is cross-frame unsafe)

0.1.1

  • Fix: Add missing peerDependencies for new items

0.1.0

  • Enhancement: Add eslint-plugin-no-use-extend-native and add from eslint-plugin-unicorn

0.0.4

  • Fix: Make devDeps explicitly include eslint-plugin-node and eslint-plugin-standard as eslint-config-standard currently relying on them.

0.0.3

  • Fix: Should need eslint-config-standard instead of eslint-plugin-standard

0.0.2

  • Name change/first working version