0.5.7 • Published 7 months ago

eslint-plugin-sequence v0.5.7

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

eslint-plugin-sequence

github actions npm npm downloads

A collection of EsLint rules variously related to sequences: sequences of imports, import members, characters, and other elements.

Import rules can be used on ES6+ imports, as well as TypeScript imports

ordered-imports-by-path

(fixable): sort import statements by path

ordered-import-members

(fixable): sort imported members by name

strict-camel-case

(fixable via suggestions): enforce StrictCamelCase style, forbid LOOSECamelCase

logical-expression-complexity

(not fixable): enforce limits on complexity of logical expressions

Installation

npm install --save-dev eslint-plugin-sequence

Configure with EsLint, e.g. in .eslintrc.json

...
"plugins": [
    "sequence"
],
"rules": {
    "sequence/ordered-imports-by-path": [
        "error", {
            "ignoreCase": true,
            "sortSideEffectsFirst": true,
            "allowSeparateGroups": true,
            "sortTypeImportsFirst": true
        }
    ],
    "sequence/ordered-import-members": [
        "error", {
            "ignoreCase": true,
            "sortSpecifiersWithComments": true
        }
    ],
    "sequence/strict-camel-case": [
        "error", {
            "ignoreProperties": false,
            "ignoreImports": false,
            "ignoredIdentifiers": ["legacyAPI", "htmlToXML", "PI", "TAU", "EPSILON"],
            "allowOneCharWords": "last",
            "ignoreSingleWords": false,
            "ignoreSingleWordsIn": ["enum_member", "static_class_field"]
        }
    ],
    "sequence/logical-expression-complexity": [
        "error", {
            "maxHeight": 3,
            "maxTerms": 6,
            "binaryOperators": ["==", "===", "!=", "!=="],
            "includeTernary": true
        }
    ],
    ...
}
...
0.5.7

7 months ago

0.5.4

7 months ago

0.5.3

7 months ago

0.5.6

7 months ago

0.5.5

7 months ago

0.5.0

7 months ago

0.4.0

7 months ago

0.5.1

7 months ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago