@radek-altof/lint-config

1.1.1 • Public • Published

Linting configuration

Custom ESlint & Stylelint configuration.

ESLint

The rules are defined in eslint.json. Complete list of ESLint rules can be found here: https://eslint.org/docs/rules/

Stylelint

The rules are defined in stylelint.json. Complete list of Stylelint rules can be found here: https://stylelint.io/user-guide/rules/

Installation

$ npm i @radek-altof/lint-config --save-dev

Configuration

Extend your ESLint and Stylelint config files. Ex.:

{
  "extends": ["./node_modules/@radek-altof/lint-config/eslint.json"]
} 

Grunt

Install grunt dependencies.

$ npm i grunt-eslint --save-dev
$ npm i grunt-stylelint --save-dev

Update gruntfile.js in your project.

grunt.initConfig({
  eslint: {
    options: {
      configFile: 'eslint.json',
      fix: grunt.option('fix')
    },
    target: ['js/*.js']
  },
  stylelint: {
    options: {
      configFile: 'stylelint.json',
      syntax: 'scss',
      fix: grunt.option('fix')
    },
    src: [ 'css/*.scss' ]
  }
});

Lint your code.

$ grunt eslint 
$ grunt stylelint

Package Sidebar

Install

npm i @radek-altof/lint-config

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

12.6 kB

Total Files

5

Last publish

Collaborators

  • radek-altof