Skip to content

Various ESLint rules tailored to the author's preferred style

Notifications You must be signed in to change notification settings

arcanis/eslint-plugin-arca

Repository files navigation

eslint-plugin-arca

The @arcanis personal collection of ESLint rules.

I tend to have strong personal preferences about what readable code should look like, and they don't always match how the Prettier rules would work. This repo contains some ESLint rules that help enforce my style at no cost for other contributors, as they are all intended to be autofixable.

Most of these rules are available as a preset via @yarnpkg/eslint-config.

Installation

Assuming you have ESLint installed, just install eslint-plugin-arca:

yarn add -D eslint-plugin-arca

Usage

Add arca to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": [
    "arca"
  ]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "arca/curly": 2,
    "arca/import-absolutes": 2,
    "arca/import-align": 2,
    "arca/import-ordering": 2,
    "arca/jsx-longhand-props": 2,
    "arca/melted-constructs": 2,
    "arca/newline-after-import-section": 2,
    "arca/no-default-export": 2
  }
}

Supported Rules

Note: all these rules are autofixed. This is why some may look duplicate with others that aren't (for instance arca/jsx-import-react is autofixable, but react/react-in-jsx-scope isn't).

License

Copyright © 2016 Maël Nison

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Various ESLint rules tailored to the author's preferred style

Topics

Resources

Stars

Watchers

Forks