🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

fe-code-lint

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fe-code-lint

front-end code lint

Source
npmnpm
Version
0.0.21
Version published
Weekly downloads
4
-50%
Maintainers
1
Weekly downloads
 
Created
Source

install

npm install fe-lint --save-dev

usage

eslint

// path/to/yourproject/.eslintrc.js

let dftCfg, cfg;

dftCfg = require("fe-code-lint/src/eslint/.eslintrc");
cfg = Object.assign({}, dftCfg, {
    root: true,
    parser: "babel-eslint",
    // required to lint *.vue files
    plugins: [
        "html"
    ]
});
// allow debugger during development
cfg.rules["no-debugger"] = process.env.NODE_ENV === "production" ? 2 : 0;

module.exports = cfg;

stylelint

// path/to/yourproject/.stylelintrc.js

const cfg = require("fe-code-lint/src/stylelint/.stylelintrc");
module.exports = Object.assign({}, cfg);

add below commands to your package.json file

"scripts": {
    "eslint": "eslint --ext .js,.vue src",
    "stylelint": "stylelint \"./src/**/*.less\"",
}

detail config

https://cn.eslint.org/docs/user-guide/configuring

Keywords

code-lint

FAQs

Package last updated on 09 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts