eslint-config-godaddy
v9.0.0
Published
Base ESLint config for consistent style in ES6 projects at GoDaddy.
Readme
eslint-config-godaddy
Base ESLint configuration for non-React, ES6 JavaScript applications officially used at GoDaddy.
This styleguide is used by dozens of product teams at GoDaddy. Have a question or comment? Open an issue!
There are many useful features:
- Standard. No configuration. – Stop worrying about style and focus on your work.
- Modern – Uses modern linting tools like
eslint. - Auto-fix – Auto-fix is enabled by-default through in
eslint. Many rules will fix themselves!
Installation
npm install eslint-config-godaddy --save-devUsage
There are two ways to use this styleguide depending on your own tooling preference: directly using pre-included binaries or running eslint yourself with a custom eslint.config.js config.
Define your local eslint.config.js|mjs and run eslint yourself
import GDConfig from 'eslint-config-godaddy';
import { defineConfig } from 'eslint-define-config';
export default defineConfig({
extends: [
GDConfig,
],
rules: {
// Add your own rules here
'no-console': 'warn',
},
});The --fix option in eslint is only available as a CLI option. Auto-fix will NOT be enabled unless you run eslint --fix in your package.json.
{
"scripts": {
"lint": "eslint --fix files/ you/ want-to/ lint/"
}
}FAQ
How do I override a specific rule?
Add a eslint.config.js|mjs file at the root of your project:
import GDConfig from 'eslint-config-godaddy';
import { defineConfig } from 'eslint-define-config';
export default defineConfig({
extends: [
GDConfig,
],
rules: {
// Add your own rules here
'no-console': 'warn',
},
});How do I contribute?
Fork this repository and submit a pull request. See the main repository for detailed contribution guidelines.
I disagree with a specific rule
Great. We'd love to talk about it. Fork this repository and submit a pull-request.
Help! It's not working for me
No problem. Reach out to us by opening an issue
