All Projects → davidjbradshaw → eslint-config-adjunct

davidjbradshaw / eslint-config-adjunct

Licence: MIT License
A reasonable collection of plugins to use alongside your main esLint configuration

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eslint-config-adjunct

Rxjs Marbles
An RxJS marble testing library for any test framework
Stars: ✭ 267 (+584.62%)
Mutual labels:  jasmine, mocha, jest, ava
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (+197.44%)
Mutual labels:  eslint, redux-saga, jest, prettier
awesome-address-book
This project shows a basic address book built with ReactJS, Redux Toolkit and Typescript 📖
Stars: ✭ 20 (-48.72%)
Mutual labels:  eslint, jest, prettier, cypress
Enzyme
JavaScript Testing utilities for React
Stars: ✭ 19,781 (+50620.51%)
Mutual labels:  mocha, jest, chai, ava
Jest Codemods
Codemods for migrating to Jest https://github.com/facebook/jest 👾
Stars: ✭ 731 (+1774.36%)
Mutual labels:  mocha, jest, chai, ava
Vue Skeleton Mvp
VueJs, Vuetify, Vue Router and Vuex skeleton MVP written on JavaScript using async/await built to work with API REST skeleton: https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton
Stars: ✭ 406 (+941.03%)
Mutual labels:  mocha, eslint, prettier, chai
react16-seed-with-apollo-graphql-scss-router4-ssr-tests-eslint-prettier-docker-webpack3-hot
Seed to create your own project using React with Apollo GraphQL client
Stars: ✭ 19 (-51.28%)
Mutual labels:  mocha, eslint, jest, prettier
Redux Saga Testing
A no-brainer way of testing your Sagas
Stars: ✭ 150 (+284.62%)
Mutual labels:  mocha, redux-saga, jest, ava
Public
Repository for wallaby.js questions and issues
Stars: ✭ 662 (+1597.44%)
Mutual labels:  jasmine, mocha, jest, ava
ts-snippet
A TypeScript snippet compiler for any test framework
Stars: ✭ 29 (-25.64%)
Mutual labels:  jasmine, mocha, ava
linter-sniffer-pretty-printer
Collection of packages and configs to lint and format code in your WordPress project.
Stars: ✭ 35 (-10.26%)
Mutual labels:  prettier, eslint-configs, prettier-eslint
nextjs-starter-kit
NextJS Starter Kit with Testing Frameworks and CI/CD
Stars: ✭ 30 (-23.08%)
Mutual labels:  eslint, jest, cypress
eslint-config-ns
ESLint config ready to be used in multiple projects. Based on Airbnb's code style with prettier, jest and react support.
Stars: ✭ 27 (-30.77%)
Mutual labels:  prettier, eslint-config, prettier-eslint
Babel Plugin Tester
Utilities for testing babel plugins
Stars: ✭ 228 (+484.62%)
Mutual labels:  jasmine, mocha, jest
typescript-api-starter
🔰 Starter for Node.js express API in Typescript 🚀
Stars: ✭ 72 (+84.62%)
Mutual labels:  eslint, prettier, chai
Testdeck
Object oriented testing
Stars: ✭ 206 (+428.21%)
Mutual labels:  jasmine, mocha, jest
qa-automation-base
There are basic projects for automation frameworks based on Kotlin/Java and TypeScript for the backend, frontend, and mobile.
Stars: ✭ 45 (+15.38%)
Mutual labels:  mocha, jest, chai
zero
📦 A zero config scripts library
Stars: ✭ 17 (-56.41%)
Mutual labels:  eslint, jest, prettier
Feathers Vue
A boiler plate template using Feathers with Email Verification, Vue 2 with Server Side Rendering, stylus, scss, jade, babel, webpack, ES 6-8, login form, user authorization, and SEO
Stars: ✭ 195 (+400%)
Mutual labels:  jasmine, mocha, lodash
reactjs-vite-tailwindcss-boilerplate
ReactJS + Vite boilerplate to be used with Tailwindcss.
Stars: ✭ 103 (+164.1%)
Mutual labels:  eslint, jest, prettier

eslint-config-adjunct

A reasonable collection of plugins to use alongside your main esLint configuration

This config is designed to be used alongside any of the major esLint configs, such as airbnb, standard or eslint:recommended. It provides a range of useful plugins that are often too time-consuming to setup and provides an easy way to install just the plugins you need, based on your project's dependencies.

Install

To install this config, run the following command.

npm install eslint-config-adjunct --save-dev

Configure

Extend your .eslintrc, with adjunct, which should be the last item in the extends array. For example if your using eslint-config-airbnb as your main rule set, your .eslintrc should look like the following. For more advanced use cases see the example configurations for TypeScript and Vue.

{
  "extends": ["airbnb", "adjunct"]
}

You can now include html, json and markdown in the list of files passed to eslint to lint any JavaScript contained.

{
  "scripts": {
    "eslint": "eslint --color --ext .html,.js,.json,.jsx,.md *.* src",
    "eslint:fix": "npm run eslint -- --fix"
  }
}

Install Dependencies

After you have configured eslint to include this package, the first time you run eslint it will output the npm command to install the dependencies required for your project. Cut'n'paste this command into the console, and you are then ready to start linting.

Plugins

Code Quality

These two plugins provide a range of code quality rules:

Langauges

The following plugins expand esLint to work with json files, and lint JavaScript contiained in HTML and MarkDown:

When linting code snippets in Markdown files, a few rules relating to globals and unused vars are disabled.

Library Plugins

These plugins will be loaded in based on your project dependencies in package.json. If a supported library is part of your project then it's related esLint plugins will be loaded. The following packages are supported:

Practices

The following esLint plugins enforce good coding practices:

Prettier

If prettier is installed, any rules that may conflict with Prettier will be disabled. The plugin should read you Prettier config from your project's root.

The prettier configs for different eslint plugins are also automatically included based on which eslint plugins have been installed into your project.

Security

These plugins add code security rules to esLint:

Test Libraries

Test plugins are loaded based on which testing tools you have listed in devDependencies of package.json. The following test plugins are supported:

For test files a few rules are turned off, to better to support normal unit test code styles.

Rules

In the most part the default rules are used for the plugins listed above, with the following exceptions.

Switch-Case

Adds the fallthrough: 'never' option to the newline-between-switch-case rule.

// Good

switch (foo) {
  case 1:
    something()
    break

  case 2:
  case 3:
    somethingElse()
    break

  default:
    defaultThing()
}

Disabled rules

The following rules are disabled due to them being considered unduly restrictive or unhelpful.

  • jest/no-disabled-tests
  • react-redux/prefer-separate-component-file
  • redux-saga/no-unhandled-errors
  • lodash/prefer over native rules
  • lodash-fp/use-fp
  • unicorn/no-array-for-each
  • unicorn/no-fn-reference-in-iterator
  • unicorn/no-array-for-each
  • unicorn/no-reduce
  • unicorn/no-null
  • unicorn/prefer-number-properties
  • unicorn/prefer-optional-catch-binding
  • unicorn/prevent-abbreviations

The following rules are disabled due to clashing with other plugins

  • array-func/prefer-array-from
  • import/order
  • sort-imports

License

Copyright © 2019-21 David J. Bradshaw. Licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].