Skip to content
This repository was archived by the owner on May 16, 2020. It is now read-only.

Commit 4601fa4

Browse files
feat(atlauncher-scripts): add in package.json linting
1 parent 6acdebf commit 4601fa4

File tree

5 files changed

+267
-28
lines changed

5 files changed

+267
-28
lines changed

packages/atlauncher-scripts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Below is a list of commands that you can run and their arguments/switches.
4343

4444
`atlauncher-scripts lint [type] [--watch] [--debug]`
4545

46-
Takes in one argument which is the type of files to lint. Should be either `js` or `md`. CSS linting
47-
coming in the future.
46+
Takes in one argument which is the type of files to lint. Should be either `js`, `md` or
47+
`pj` (package.json). CSS linting is coming in the future.
4848

4949
You can provide a `--watch` switch to allow watching of files.
5050

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"rules": {
3+
"require-author": "error",
4+
"require-bugs": "error",
5+
"require-description": "error",
6+
"require-engines": "error",
7+
"require-homepage": "error",
8+
"require-license": "error",
9+
"require-name": "error",
10+
"require-repository": "error",
11+
"require-version": "error",
12+
13+
"bin-type": "error",
14+
"bundledDependencies-type": "error",
15+
"config-type": "error",
16+
"cpu-type": "error",
17+
"dependencies-type": "error",
18+
"description-type": "error",
19+
"devDependencies-type": "error",
20+
"directories-type": "error",
21+
"engines-type": "error",
22+
"files-type": "error",
23+
"homepage-type": "error",
24+
"keywords-type": "error",
25+
"license-type": "error",
26+
"main-type": "error",
27+
"man-type": "error",
28+
"name-type": "error",
29+
"optionalDependencies-type": "error",
30+
"os-type": "error",
31+
"peerDependencies-type": "error",
32+
"preferGlobal-type": "error",
33+
"private-type": "error",
34+
"repository-type": "error",
35+
"scripts-type": "error",
36+
"version-type": "error",
37+
38+
"valid-values-license": ["error", [
39+
"unlicensed",
40+
"MIT"
41+
]],
42+
43+
"prefer-alphabetical-bundledDependencies": "error",
44+
"prefer-alphabetical-dependencies": "error",
45+
"prefer-alphabetical-devDependencies": "error",
46+
"prefer-alphabetical-optionalDependencies": "error",
47+
"prefer-alphabetical-peerDependencies": "error",
48+
"prefer-caret-version-dependencies": "error",
49+
"prefer-caret-version-devDependencies": "error",
50+
51+
"name-format": "error",
52+
"version-format": "error",
53+
54+
"prefer-property-order": ["error", [
55+
"name",
56+
"version",
57+
"description",
58+
"private",
59+
"keywords",
60+
"homepage",
61+
"bugs",
62+
"license",
63+
"author",
64+
"contributors",
65+
"files",
66+
"main",
67+
"module",
68+
"jsnext:main",
69+
"types",
70+
"typings",
71+
"style",
72+
"example",
73+
"examplestyle",
74+
"assets",
75+
"bin",
76+
"man",
77+
"directories",
78+
"repository",
79+
"scripts",
80+
"config",
81+
"pre-commit",
82+
"browser",
83+
"browserify",
84+
"babel",
85+
"eslintConfig",
86+
"stylelint",
87+
"npmPackageJsonLintConfig",
88+
"dependencies",
89+
"devDependencies",
90+
"peerDependencies",
91+
"bundledDependencies",
92+
"bundleDependencies",
93+
"optionalDependencies",
94+
"engines",
95+
"engineStrict",
96+
"os",
97+
"cpu",
98+
"preferGlobal",
99+
"publishConfig"
100+
]]
101+
}
102+
}

packages/atlauncher-scripts/package-lock.json

Lines changed: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/atlauncher-scripts/package.json

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,33 @@
22
"name": "@atlauncher/atlauncher-scripts",
33
"version": "0.1.0-17",
44
"description": "Configuration and scripts for use with ATLauncher projects.",
5-
"scripts": {
6-
"lint": "npm run lint:md",
7-
"lint:md": "markdownlint -c ./config/.markdownlint.json *.md"
8-
},
9-
"repository": {
10-
"type": "git",
11-
"url": "https://github.com/ATLauncher/style-guide"
12-
},
13-
"publishConfig": {
14-
"access": "public"
15-
},
165
"keywords": [
176
"javascript",
187
"scripts",
198
"linting",
209
"testing"
2110
],
22-
"author": "Ryan Dowling (https://twitter.com/@RyanAllmighty1)",
23-
"license": "MIT",
11+
"homepage": "https://github.com/ATLauncher/style-guide",
2412
"bugs": {
2513
"url": "https://github.com/ATLauncher/style-guide/issues"
2614
},
27-
"homepage": "https://github.com/ATLauncher/style-guide",
15+
"license": "MIT",
16+
"author": "Ryan Dowling (https://twitter.com/@RyanAllmighty1)",
2817
"bin": {
2918
"atlauncher-scripts": "./bin/atlauncher-scripts.js"
3019
},
20+
"repository": {
21+
"type": "git",
22+
"url": "https://github.com/ATLauncher/style-guide"
23+
},
24+
"scripts": {
25+
"lint": "npm run lint:md && npm run lint:pj",
26+
"lint:md": "markdownlint -c ./config/.markdownlint.json *.md",
27+
"lint:pj": "pjl-cli --rules-file ./config/.npmpackagejsonlintrc --file ./package.json"
28+
},
3129
"dependencies": {
32-
"@atlauncher/babel-preset-atlauncher": "0.1.0-12",
33-
"@atlauncher/eslint-config-atlauncher": "0.1.0-14",
30+
"@atlauncher/babel-preset-atlauncher": "^0.1.0-12",
31+
"@atlauncher/eslint-config-atlauncher": "^0.1.0-14",
3432
"@atlauncher/eslint-plugin-atlauncher": "^0.2.1",
3533
"babel-cli": "^6.26.0",
3634
"babel-eslint": "^8.2.1",
@@ -51,11 +49,15 @@
5149
"is-windows": "^1.0.1",
5250
"jest": "^22.1.4",
5351
"markdownlint": "^0.7.0",
54-
"markdownlint-cli": "^0.6.0"
52+
"markdownlint-cli": "^0.6.0",
53+
"npm-package-json-lint": "^2.11.1"
5554
},
56-
"engineStrict": true,
5755
"engines": {
5856
"node": ">=8",
5957
"npm": ">=5"
58+
},
59+
"engineStrict": true,
60+
"publishConfig": {
61+
"access": "public"
6062
}
6163
}

0 commit comments

Comments
 (0)