eslint-config-craft-ai

3.0.3 • Public • Published

eslint-config-craft-ai

This is craft ai's ESLint configuration for es5 and es6.

Version Build License Dependencies Dev Dependencies

Usage

Basics

  • Install this package and every needed dependencies using
npm install --save-dev eslint eslint-config-craft-ai \
                       babel-eslint # Optional, if you are using Babel in your project 
                       eslint-plugin-react # Optional, if your using React in your project 
  • Create a .eslintrc file in your project's root with the following content
{
  "extends": "craft-ai"
}

Or choose one of the following configurations: craft-ai/base, craft-ai/react, craft-ai/base.babel, craft-ai/react.babel. Default is craft-ai/base.babel.

Configurations starting by craft-ai/react is for React applications and needs eslint-plugin-react to be installed.

Configurations ending by .babel requires babel-eslint.

  • Optionally, create a .eslintignore file to list paths that won't need any linting (see this for further details)

  • Optionally, add the following to your package.json file

{
  "scripts": {
    "lint": "eslint .",
    "fix_lint": "eslint --fix ."
  }
}

You can now run npm run lint to check if the rules are properly applied, and npm run fix_lint to let eslint fix what is fixable.

(for craft ai devs) Releasing a new version

  • Make sure the build of the master branch is passing
  • Checkout the master branch locally
git fetch
git checkout master
git reset --hard origin/master
  • Bump the version and push
npm version patch # or 'minor' or 'major' 
git push origin master
git push --tags

Package Sidebar

Install

npm i eslint-config-craft-ai

Weekly Downloads

8

Version

3.0.3

License

BSD-3-Clause

Unpacked Size

7.98 kB

Total Files

11

Last publish

Collaborators

  • craft-ai