UNPKG

canonical

Version:

Canonical code style linter and formatter for JavaScript, SCSS and CSS.

85 lines (84 loc) 5.27 kB
{ "_args": [ [ "css-lint@https://registry.npmjs.org/css-lint/-/css-lint-1.0.1.tgz", "/Users/gajus/Documents/dev/canonical-code-style/canonical" ] ], "_from": "css-lint@>=1.0.1 <2.0.0", "_id": "css-lint@1.0.1", "_inCache": true, "_location": "/css-lint", "_phantomChildren": {}, "_requested": { "name": "css-lint", "raw": "css-lint@https://registry.npmjs.org/css-lint/-/css-lint-1.0.1.tgz", "rawSpec": "https://registry.npmjs.org/css-lint/-/css-lint-1.0.1.tgz", "scope": null, "spec": "https://registry.npmjs.org/css-lint/-/css-lint-1.0.1.tgz", "type": "remote" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/css-lint/-/css-lint-1.0.1.tgz", "_shasum": "dee6c52308aa48e4c5be80e7e1e7280bec96acae", "_shrinkwrap": null, "_spec": "css-lint@https://registry.npmjs.org/css-lint/-/css-lint-1.0.1.tgz", "_where": "/Users/gajus/Documents/dev/canonical-code-style/canonical", "author": { "name": "Sam Richard" }, "bin": { "sass-lint": "./bin/sass-lint.js" }, "bugs": { "url": "https://github.com/sasstools/sass-lint/issues" }, "dependencies": { "commander": "^2.8.1", "eslint": "^1.1.0", "fs-extra": "^0.24.0", "glob": "^5.0.15", "gonzales-pe": "3.0.0-31", "js-yaml": "^3.2.6", "lodash.capitalize": "^3.0.0", "lodash.clone": "^3.0.3", "lodash.kebabcase": "^3.0.1", "lodash.sortby": "^3.1.5", "merge": "^1.2.0", "util": "^0.10.3" }, "description": "All Node Sass linter!", "devDependencies": { "coveralls": "^2.11.4", "deep-equal": "^1.0.1", "istanbul": "^0.4.0", "mocha": "^2.2.5", "should": "^7.0.4" }, "homepage": "https://github.com/sasstools/sass-lint", "keywords": [ "CSS", "SCSS", "Sass", "lint" ], "license": "MIT", "main": "index.js", "name": "css-lint", "optionalDependencies": {}, "readme": "# CSS Lint\n\nA Node-only Sass linter for `css`, `sass` and `scss` syntax!\n\n## Install\n\n```\nnpm install css-lint --save-dev\n```\n\n## Configuring\n\nUse the [Sample Config](docs/sass-lint.yml) as a guide to create your `.sass-lint.yml` in the root of where you are running Sass Lint from. The default configuration can be found [here](https://github.com/sasstools/sass-lint/blob/master/lib/config/sass-lint.yml).\n\n*Migrating from SCSS-Lint*: If you already have a config for SCSS-Lint, you can instantly convert it to the equivalent Sass Lint config at [sasstools.github.io/make-sass-lint-config](http://sasstools.github.io/make-sass-lint-config/).\n\n### Options\n\nThe following are options that you can use to config the Sass Linter.\n\n#### Files\n\nThe `files` option can either be set to a [glob](https://github.com/isaacs/node-glob) or it can be set to an object, where the key `include` is set to the glob you want to include, and `ignore` set to either a glob string or an array of glob strings that you would like to ignore.\n\n#### Rules\n\nFor all [rules](docs/rules), setting their severity to `0` turns it off, setting to `1` sets it as a warning (something that should not be committed in), and setting to `2` set it to an error (something that should not be written). If a rule is set to just a severity, it will use the default configuration (where available).\n\nIf you want to configure options, set the rule to an array, where the first item in the array is the severity, and the second item in the array is an object including the options you would like to set.\n\nAn example configuration of a rule with options look like the following:\n\n```yml\nindentation:\n - 2\n -\n size: 2\n```\n\n## CLI\n\nSass Lint [`v1.1.0`](https://github.com/sasstools/sass-lint/releases/tag/v1.1.0) introduced the ability to run Sass Lint through a command line interface. See the [CLI Docs](docs/cli) for full documentation on how to use the CLI.\n\n## Creating Rules\n\nOur AST is [Gonzales-PE](https://github.com/tonyganch/gonzales-pe/tree/dev). Each rule will be passed the full AST which they can traverse as they please. There are many different [node types](https://github.com/tonyganch/gonzales-pe/blob/dev/doc/node-types.md) that may be traversed, and an extensive [API for working with nodes](https://github.com/tonyganch/gonzales-pe/tree/dev#api). The file of the rule must have the same name as the name of the rule. All of the available rules are in our [rules directory](https://github.com/sasstools/sass-lint/tree/develop/lib/rules). Default options will be merged in with user config.\n\n## Task Runner Integration\n\n* [Gulp](https://www.npmjs.com/package/gulp-sass-lint)\n* [Grunt](https://github.com/sasstools/grunt-sass-lint)\n\n## IDE Integration\n\n* [Atom](https://atom.io/packages/linter-sass-lint)\n* [Sublime Text](https://github.com/skovhus/SublimeLinter-contrib-sass-lint)\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/gajus/css-lint.git" }, "scripts": { "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "pretest": "eslint .", "preversion": "npm test", "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec tests tests/rules" }, "version": "1.0.1" }