Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config overrides api #123

Merged
merged 27 commits into from Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e7037f5
Add logic to apply overrides
tclindner Jul 7, 2019
54bd88f
Update eslint-config-tc
tclindner Jul 7, 2019
f0317bf
Add cosmicconfig and switch to globby
tclindner Jul 7, 2019
33af779
Add new utils for ignore and file list
tclindner Jul 7, 2019
8505325
Add error handling to config
tclindner Jul 7, 2019
17e3e01
Add typedef to LintIssue
tclindner Jul 7, 2019
dfcd243
Add new linter and results helper
tclindner Jul 7, 2019
bccfec7
Add tests for utils
tclindner Jul 7, 2019
8e06a0f
Tests for new linter
tclindner Jul 7, 2019
6a1c163
Add test for absolute paths
tclindner Jul 7, 2019
c1b22ee
Add tests for overrides and extends
tclindner Jul 7, 2019
293c43d
Add ignore support to cli reporter
tclindner Jul 7, 2019
79aea99
Update api now that CLIEngine is no longer exported
tclindner Jul 7, 2019
90de656
Update Reporter.js
tclindner Jul 7, 2019
7c13081
Add initial version of transformer
tclindner Jul 7, 2019
7964ba2
Add config tests
tclindner Jul 8, 2019
0e4b709
Update CHANGELOG.md
tclindner Jul 8, 2019
60eb3bc
Update cosmicConfigTransformer.js
tclindner Jul 27, 2019
0f1da1d
Ignore lint temporarily for beta
tclindner Jul 27, 2019
073fec4
Fix file paths
tclindner Jul 27, 2019
2d67541
Update ConfigValidator.test.js
tclindner Jul 27, 2019
2a9db09
Update ConfigValidator.test.js
tclindner Jul 27, 2019
6edf8ba
Update NpmPackageJsonLint.test.js
tclindner Jul 27, 2019
9ec5182
Update getFileList.js
tclindner Jul 27, 2019
b9ba98d
Update getFileList.js
tclindner Jul 27, 2019
64995d5
Add default for base config directory
tclindner Jul 27, 2019
0f2ef1b
Add additional tests for overrides and local build script
tclindner Jul 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .npmpackagejsonlintrc.json
@@ -0,0 +1,6 @@
{
"extends": "npm-package-json-lint-config-tc",
"rules": {
"require-peerDependencies": "off"
}
}
33 changes: 33 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,12 +4,45 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- Added exception support to the following rules:

- [`no-absolute-version-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/no-absolute-version-dependencies)
- [`no-absolute-version-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/no-absolute-version-devDependencies)
- [`no-caret-version-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/no-caret-version-dependencies)
- [`no-caret-version-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/no-caret-version-devDependencies)
- [`no-tilde-version-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/no-tilde-version-dependencies)
- [`no-tilde-version-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/no-tilde-version-devDependencies)
- [`prefer-absolute-version-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-absolute-version-dependencies)
- [`prefer-absolute-version-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-absolute-version-devDependencies)
- [`prefer-caret-version-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-caret-version-dependencies)
- [`prefer-caret-version-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-caret-version-devDependencies)
- [`prefer-no-version-zero-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-no-version-zero-dependencies)
- [`prefer-no-version-zero-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-no-version-zero-devDependencies)
- [`prefer-tilde-version-dependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-tilde-version-dependencies)
- [`prefer-tilde-version-devDependencies`](https://github.com/tclindner/npm-package-json-lint/wiki/prefer-tilde-version-devDependencies)

> Addresses [#93](https://github.com/tclindner/npm-package-json-lint/issues/93)

### Changed
- [`name-format`](https://github.com/tclindner/npm-package-json-lint/wiki/name-format) now checks the following things:

- Name is lowercase
- Name is less than 214 characters. This includes scope.
- Name doesn't start with a `.` or a `_`.

> Addresses [#115](https://github.com/tclindner/npm-package-json-lint/issues/115)

- Improved schema validation that runs against npm-package-json-lint config files. Highlights include:

- Better error messages. Ex: `- severity must be either "off", "warning", or "error".`
- Array type rules now ensure at least one item is passed.
- Array type rules now validate unique items are passed.

### Fixed

### Removed
- Dropped support for Node 6 and 7.


## [3.7.0] - 2019-06-16
### Added
Expand Down
8 changes: 4 additions & 4 deletions jest.config.js
Expand Up @@ -4,10 +4,10 @@ module.exports = {
collectCoverageFrom: ['src/**/*.js'],
coverageThreshold: {
global: {
branches: 92,
functions: 100,
lines: 97,
statements: 97
branches: 87,
functions: 91,
lines: 92,
statements: 92
}
},
restoreMocks: true,
Expand Down
12 changes: 7 additions & 5 deletions package.json
Expand Up @@ -29,19 +29,20 @@
"main": "src/api.js",
"scripts": {
"eslint": "eslint . --format=node_modules/eslint-formatter-pretty",
"lint": "npm run eslint",
"npmpackagejsonlint": "node src/cli.js .",
"lint": "npm run eslint && npm run npmpackagejsonlint",
"test": "jest",
"test:ci": "jest --runInBand"
},
"dependencies": {
"ajv": "^6.10.0",
"ajv-errors": "^1.0.1",
"chalk": "^2.4.2",
"glob": "^7.1.4",
"cosmiconfig": "^5.2.1",
"debug": "^4.1.1",
"globby": "^10.0.1",
"ignore": "^5.1.2",
"is-path-inside": "^2.1.0",
"is-plain-obj": "^2.0.0",
"is-resolvable": "^1.1.0",
"log-symbols": "^3.0.0",
"meow": "^5.0.0",
"plur": "^3.1.1",
Expand All @@ -50,13 +51,14 @@
},
"devDependencies": {
"eslint": "^5.16.0",
"eslint-config-tc": "^6.4.0",
"eslint-config-tc": "^6.5.0",
"eslint-formatter-pretty": "^2.1.1",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-prettier": "^3.1.0",
"figures": "^3.0.0",
"jest": "^24.8.0",
"npm-package-json-lint-config-default": "^2.0.0",
"npm-package-json-lint-config-tc": "^2.2.0",
"prettier": "^1.18.2"
},
"engines": {
Expand Down