4.0.1 • Published 6 years ago

@zthun/zwebstyles v4.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

Description

ZWebStyles is a collection of hint files that can be used with build tools to validate coding styles.

Usage

The usage depends on the tools your using. To get the package itself, you can use npm.

npm install @zthun/zwebstyles --save-dev

Available Styles

The following styling options are included in this package.

Config FileForDescription
.jshintrcJavascriptUsed for jshint checks.
.htmlhintrcHTMLUsed for htmlhint checks.
.sasslint.ymlSASSUsed for sasslint checks.
.eslintrcJavascriptUsed for eslint checks.
tslint.jsonTypescriptUsed for tslint checks.

Example

In grunt, you can use this with the grunt-contrib-jshint plugin:

jshint: {
    options: {
        jshintrc: 'node_modules/zwebstyles/.jshintrc'
    },
    self: {
        files: {
            src: ['gruntfile.js']
        }
    },
    main: {
        files: {
            src: ['src/**/*.js']
        }
    },
    test: {
        files: {
            src: ['src/**/*.spec.js']
        }
    }
}

You can also use them on the command line with various tools.

eslint src/**/*.js config/**/*.js --config=node_modules/zwebstyles/.eslintrc --parser babel-eslint
tslint -c node_modules/zwebstyles/tslint.json src/**/*.ts src/*.ts
sass-lint src/**/*.scss --config=node_modules/zwebstyles/.sasslint.yml -v -q
htmlhint src/**/*.html --config=node_modules/zwebstyles/.htmlhintrc