Skip to content

Conversation

@banderso-n
Copy link

@banderso-n banderso-n commented May 4, 2022

Creates skeleton package for new eslint file with rules based on recent airbnb eslint audit https://docs.google.com/spreadsheets/d/1IFX1-EwKxGmF7VZCcEsVp2nu56WkJUhWKBbHLkECagc

STEPS TO TEST
Our eslint config will basically just override airbnb's for the few places where we disagree with them. So to test this config, setup airbnb's config (or base config if you're not using react) as you normally would, then add a line to the extends array in your eslint config to pull in these rules.

1. Pull in the new eslint file (e.g. add this to your package.json)

"nerdery-javascript-standards": "banderso-n/javascript-standards#feature/eslint-updates",

2. Reference the eslint file in your config's "extends" array

// your .eslintrc.js file
module.exports = {
  extends: [
    'airbnb-base', // or just 'airbnb' if it's a react project
    'airbnb-typescript/base', // or just 'airbnb-typescript' if it's a react project (ignore this for vanilla js projects)
    './node_modules/nerdery-javascript-standards/packages/eslint-config-nerdery-base/.eslintrc.js',
  ],
  parserOptions: { // ignore this for vanilla js projects
    project: './tsconfig.json'
  },
  rules: {
    // Your project-specific overrides
  },
};

3. Get testin'

@banderso-n
Copy link
Author

FYI there are some commits on master that are not on develop so I'd recommend merging master into develop. It should be done anyway, but it'll also make this PR easier to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants