You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* #43 Add test fixtures for new config loading options
* Bump version and dependencies
* Pass package.json file contents to Config class
* #43 Update config class with new options
1. a `npmPackageJsonLintConfig` property in `package.json`
2. a `.npmpackagejsonlintrc` file in the current working directory
3. a `npmpackagejsonlint.config.js` file that exports a config object
in the current working directory.
4. a global `.npmpackagejsonlintrc` file in the root of your user
directory
5. a global `npmpackagejsonlint.config.js` file that exports a config
object in the root of your user directory
* #43 Update changelog with new config options
* #43 Update README with documentation on configuration
* Fix case typo in file page
* Adjusting coverage for require methods
Run using the default config on a file relative to the current working directory
69
+
Run on file relative to the current working directory. npm-package-json-lint attempts to find config. See lookup order below.
70
70
`pjl-cli -f "../relative-path/package.json"`
71
71
72
+
Run on file in the current working directory. npm-package-json-lint attempts to find config. See lookup order below.
73
+
`pjl-cli`
74
+
72
75
## Lint Rules
73
76
74
77
npm-package-json-lint has a configurable set of rules. Please see the [wiki](https://github.com/tclindner/npm-package-json-lint/wiki) for a full list of available rules. By default no rules are enabled. If you would like to use npm-package-json-lint's default ruleset, please see [npm-package-json-lint-config-default](https://github.com/tclindner/npm-package-json-lint-config-default).
@@ -80,7 +83,13 @@ Each rule contains the following properties:
80
83
3. Message - example: author is required
81
84
4. Rule Type - example: required
82
85
83
-
As mentioned in the "Commands and configuration" section there are two ways to specify rule sets. The first is using `--rule` to specify a given rule. This will run npm-package-json-lint with just this rule. The second is using `--rules-file` to specify a JSON file, named [`.npmpackagejsonlintrc`](https://github.com/tclindner/npm-package-json-lint/wiki/npm-package-json-lint-rc), to run a set of rules. If neither of the options above are specified then npm-package-json-lint looks for a global [`.npmpackagejsonlintrc`](https://github.com/tclindner/npm-package-json-lint/wiki/npm-package-json-lint-rc) file in the root of your user directory.
86
+
As mentioned in the "Commands and configuration" section there are two ways to specify rule sets. The first is using `--rule` to specify a given rule. This will run npm-package-json-lint with just this rule. The second is providing a configuration object. As of v2.7.0, there are multiple ways to provide a [configuration object](https://github.com/tclindner/npm-package-json-lint/wiki/configuration).
87
+
88
+
1. Adding a `--rules-file` to the command to specify a JSON file. This file is typically named [`.npmpackagejsonlintrc`](https://github.com/tclindner/npm-package-json-lint/wiki/npm-package-json-lint-rc); however, you may optionally add a .json extension if you prefer.
89
+
2. Add a `npmPackageJsonLintConfig` property in `package.json` file
90
+
3. Add a `npmpackagejsonlint.config.js` file that exports a config object in the current working directory.
91
+
4. Add a global `.npmpackagejsonlintrc.json` file in the root of your user directory
92
+
5. Add a global `npmpackagejsonlint.config.js` file that exports a config object in the root of your user directory
0 commit comments