Skip to content

themaven-net/eslint-config-maven

Repository files navigation

@themaven-net/eslint-config-maven

Say Media's eslint / prettier config

Goals:

  • Add support for ES6 by transitioning to ESLint.
  • Minimize the transition friction for developers.
  • Leverage the ESLint power to reduce the number of bugs.
  • Progressively improve our code style.
  • Provide a common set of options for code formatting applied by Prettier.

Steps:

  • Start from the "Standard" ESLint settings.
  • Apply/disable rules until it matches our code style/state.
  • Replace JSHint and JSCS by ESLint in the Gruntfile.
  • Discuss the changes from the "Standard" and possibly move closer to the "Standard".

Installation

First, authenticate the GitHub npm registry. To do this, navigate to GitHub → Settings → Developer settings → Personal access tokens. Click Generate new token. Add “repo” and “read:packages” permissions. Generate the token. In the terminal, set up ~/.npmrc by running npm login --scope=@themaven-net --registry=https://npm.pkg.github.com, use your GitHub username as the username, and use the token as the password (warning: this deletes all the comments in ~/.npmrc!). Back in the browser, click “Configure SSO → Authorize” to give the token access to Maven.

Install eslint and @themaven-net/eslint-config-maven:

npm install --save-dev eslint @themaven-net/eslint-config-maven

Usage

If you've installed @themaven-net/eslint-config-maven locally within your project, just set your .eslintrc.js config to:

module.exports = {
  extends: '@themaven-net/maven' // requires '@themaven-net/eslint-config-maven'
};

For using our Prettier defaults, you'll want to make a .prettierrc.js file with this:

module.exports = require('@themaven-net/eslint-config-maven/.prettierjs');

Documentation

Extends

Plugins

History

See CHANGELOG.md for changes

Developing

To make a release, push a git tag with the version:

git checkout master
npm version major|minor|patch --message '%s ...'
git push origin master --follow-tags

The GitHub workflow npm-publish.yml will then publish the npm package to GitHub Packages and create a GitHub Release.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 9