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!
npm install eslint-config-godaddy --save-devThere 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.
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/"
}
}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',
},
});Fork this repository and submit a pull request. See the main repository for detailed contribution guidelines.
Great. We'd love to talk about it. Fork this repository and submit a pull-request.
No problem. Reach out to us by opening an issue