Skip to content

badboyku/eslint-config-badboyku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-badboyku

Shared eslint+prettier configuration with react/jest/typescript support.


Setup

  1. Install the package: npm install --save-dev eslint-config-badboyku or yarn add --dev eslint-config-badboyku

  2. Create a file named .eslintrc.js at the root and add the following:

    module.exports = {
      extends: ['badboyku'],
      rules: {},
    };
  3. Add the following to your package.json scripts:

    "scripts": {
      "lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\"",
      "lint:fix": "eslint \"./src/**/*.{js,jsx,ts,tsx}\" --fix",
      "prettier": "prettier --check \"./src/**/*.{css,scss,json}\"",
      "prettier:fix": "prettier --write \"./src/**/*.{css,scss,json}\""
    },
    

Configure Rules (optional)

If you would like to configure a rule, then you can add to the rules object inside the .eslintrc.js file (from setup step 2).

Example:

rules: {
  'no-console': 'error',
},

See https://eslint.org/docs/user-guide/configuring/rules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published