1.1.1 • Published 3 years ago

@radek-altof/lint-config v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

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