Skip to content

Commit a35641f

Browse files
authored
1.0.0 (#1)
* Add base repo files * Add npm-package-json-lint config file * Add package.json * Add docs * Add tests
1 parent 2b14982 commit a35641f

15 files changed

+507
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Full documentation can be found at editorconfig.org
2+
# This requires a plugin to be installed in the editor of choice
3+
# Link to info on plugins can be found here - http://editorconfig.org/#download
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_size = 2
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "eslint-config-tc"
3+
}

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
* text eol=lf
4+
5+
# Denote all files that are truly binary and should not be modified.
6+
*.png binary
7+
*.eot binary
8+
*.woff binary

.gitignore

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
####################################
2+
####################################
3+
### OS Files
4+
####################################
5+
####################################
6+
Thumbs.db
7+
.DS_Store
8+
9+
10+
11+
12+
####################################
13+
####################################
14+
### Git
15+
####################################
16+
####################################
17+
*.orig
18+
19+
20+
21+
22+
####################################
23+
####################################
24+
### Sublime Text
25+
####################################
26+
####################################
27+
# cache files for sublime text
28+
*.tmlanguage.cache
29+
*.tmPreferences.cache
30+
*.stTheme.cache
31+
32+
# workspace files are user-specific
33+
*.sublime-workspace
34+
35+
# sublime project files
36+
*.sublime-project
37+
38+
# sftp configuration file
39+
sftp-config.json
40+
41+
42+
43+
44+
####################################
45+
####################################
46+
### Node
47+
####################################
48+
####################################
49+
# Logs
50+
logs
51+
*.log
52+
53+
# Coverage directory used by tools like istanbul
54+
coverage
55+
56+
# Compiled binary addons (http://nodejs.org/api/addons.html)
57+
build/Release
58+
59+
# Dependency directory
60+
node_modules
61+
62+
63+
64+
65+
####################################
66+
####################################
67+
### Mocha
68+
####################################
69+
####################################
70+
mocha.json

.jscsrc

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"disallowEmptyBlocks": true,
3+
"disallowKeywordsOnNewLine": ["else"],
4+
"disallowMixedSpacesAndTabs": true,
5+
"disallowMultipleLineStrings": true,
6+
"disallowMultipleVarDecl": true,
7+
"disallowNewlineBeforeBlockStatements": true,
8+
"disallowQuotedKeysInObjects": "allButReserved",
9+
"disallowSpaceAfterObjectKeys": true,
10+
"disallowSpaceAfterPrefixUnaryOperators": true,
11+
"disallowSpaceBeforePostfixUnaryOperators": true,
12+
"disallowSpacesInAnonymousFunctionExpression": {
13+
"beforeOpeningRoundBrace": true
14+
},
15+
"disallowSpacesInCallExpression": true,
16+
"disallowSpacesInFunction": {
17+
"beforeOpeningRoundBrace": true
18+
},
19+
"disallowSpacesInFunctionDeclaration": {
20+
"beforeOpeningRoundBrace": true
21+
},
22+
"disallowSpacesInNamedFunctionExpression": {
23+
"beforeOpeningRoundBrace": true
24+
},
25+
"disallowSpacesInsideArrayBrackets": "all",
26+
"disallowSpacesInsideObjectBrackets": "all",
27+
"disallowSpacesInsideParentheses": true,
28+
"disallowTrailingComma": true,
29+
"disallowYodaConditions": true,
30+
"requireBlocksOnNewline": true,
31+
"requireCapitalizedConstructors": true,
32+
"requireCommaBeforeLineBreak": true,
33+
"requireCurlyBraces": [
34+
"if",
35+
"else",
36+
"for",
37+
"while",
38+
"do",
39+
"try",
40+
"catch",
41+
"case",
42+
"default"
43+
],
44+
"requireDotNotation": true,
45+
"requireOperatorBeforeLineBreak": true,
46+
"requirePaddingNewlinesBeforeKeywords": [
47+
"do",
48+
"for",
49+
"switch",
50+
"case",
51+
"try",
52+
"void",
53+
"while",
54+
"with"
55+
],
56+
"requireParenthesesAroundIIFE": true,
57+
"requireSpaceAfterBinaryOperators": true,
58+
"requireSpaceAfterKeywords": [
59+
"do",
60+
"for",
61+
"else",
62+
"switch",
63+
"case",
64+
"try",
65+
"catch",
66+
"void",
67+
"while",
68+
"with",
69+
"return",
70+
"typeof"
71+
],
72+
"requireSpaceBeforeBinaryOperators": true,
73+
"requireSpaceBeforeBlockStatements": true,
74+
"requireSpaceBeforeKeywords": [
75+
"else",
76+
"while",
77+
"catch"
78+
],
79+
"requireSpaceBeforeObjectValues": true,
80+
"requireSpaceBetweenArguments": true,
81+
"requireSpacesInAnonymousFunctionExpression": {
82+
"beforeOpeningCurlyBrace": true
83+
},
84+
"requireSpacesInConditionalExpression": true,
85+
"requireSpacesInForStatement": true,
86+
"requireSpacesInFunction": {
87+
"beforeOpeningCurlyBrace": true
88+
},
89+
"requireSpacesInFunctionDeclaration": {
90+
"beforeOpeningCurlyBrace": true
91+
},
92+
"requireSpacesInNamedFunctionExpression": {
93+
"beforeOpeningCurlyBrace": true
94+
},
95+
"safeContextKeyword": [],
96+
"validateIndentation": 2,
97+
"validateParameterSeparator": ", ",
98+
"validateQuoteMarks": { "mark": "'", "escape": true }
99+
}

.npmignore

Whitespace-only changes.

.npmpackagejsonlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./index.js"
3+
}

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
git:
2+
depth: 1
3+
4+
branches:
5+
only:
6+
- master
7+
8+
sudo: false
9+
10+
language: node_js
11+
12+
node_js:
13+
- "4"
14+
- "5"
15+
- "6"
16+
- "7"
17+
18+
cache:
19+
directories:
20+
- node_modules
21+
22+
before_script:
23+
- npm prune
24+
25+
script:
26+
- npm run lint
27+
- npm test

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## [Unreleased]
6+
### Added
7+
8+
### Changed
9+
10+
### Fixed
11+
12+
### Removed
13+
14+
15+
## [1.0.0] - 2017-02-18
16+
- First release

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing
2+
3+
## System Dependencies
4+
5+
### Node
6+
7+
* [Node.js](https://nodejs.org/) - v4.2.0+
8+
* [npm](https://www.npmjs.com/) - v2.14.7+
9+
10+
## Install project dependencies
11+
12+
### Code
13+
14+
* Fork and clone the npm-package-json-lint-config-default repo
15+
16+
### Install project dependencies
17+
18+
`npm install`
19+
20+
This installs dependencies from `package.json`.
21+
22+
## Code guidelines
23+
24+
### JavaScript
25+
26+
npm-package-json-lint-config-default utilizes both ESLint and JSCS to enforce JavaScript standards. Please see the `.eslintrc.json` file for ESLint config and `.jscsrc` for JSCS config.
27+
28+
* [eslint](https://github.com/eslint/eslint)
29+
* [jscs](https://github.com/jscs-dev/node-jscs)
30+
31+
#### JSON
32+
33+
npm-package-json-lint-config-default utilizes JSON Lint to ensure JSON files are valid.
34+
35+
* [jsonlint](https://github.com/zaach/jsonlint)
36+
37+
#### package.json
38+
39+
npm-package-json-lint-config-default utilizes npm-package-json-lint to ensure the package.json file is valid.
40+
41+
* [npm-package-json-lint](https://github.com/tclindner/npm-package-json-lint)
42+
43+
#### Checking coding style
44+
45+
Run `npm run lint` before committing to ensure your changes follow our coding standards.
46+
47+
## Versioning
48+
49+
Please use the following grunt commands to increment the package's version numbers
50+
EX: Assume current version is 0.0.1
51+
52+
`npm version patch`
53+
54+
If you run this command the version will increase the patch number (ie 0.0.2)
55+
56+
`npm version minor`
57+
58+
If you run this command the version will increase the minor number (ie 0.1.0)
59+
60+
`npm version major`
61+
62+
If you run this command the version will increase the major number (ie 1.0.0)
63+
64+
65+
## EditorConfig
66+
67+
EditorConfig helps maintain consistent file formatting between different editors and developers. Please [install the plugin for you editor of choice](https://editorconfig.org/#download). Please see the `.editorconfig` file at the root of this repo to see what settings are enforced.
68+
69+
## License
70+
71+
Contributions to npm-package-json-lint-config-default are subject to the [MIT License](https://github.com/tclindner/npm-package-json-lint-config-default/blob/master/LICENSE).

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# npm-package-json-lint-config-default
2+
3+
> Default [npm-package-json-lint](https://github.com/tclindner/npm-package-json-lint) shareable config
4+
5+
6+
[![license](https://img.shields.io/github/license/tclindner/npm-package-json-lint-config-default.svg?maxAge=2592000&style=flat-square)](https://github.com/tclindner/npm-package-json-lint-config-default/blob/master/LICENSE)
7+
[![npm](https://img.shields.io/npm/v/npm-package-json-lint-config-default.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/npm-package-json-lint-config-default)
8+
[![Travis](https://img.shields.io/travis/tclindner/npm-package-json-lint-config-default.svg?maxAge=2592000?style=flat-square)](https://travis-ci.org/tclindner/npm-package-json-lint-config-default)
9+
[![Dependency Status](https://david-dm.org/tclindner/npm-package-json-lint-config-default.svg?style=flat-square)](https://david-dm.org/tclindner/npm-package-json-lint-config-default)
10+
[![devDependency Status](https://david-dm.org/tclindner/npm-package-json-lint-config-default/dev-status.svg?style=flat-square)](https://david-dm.org/tclindner/npm-package-json-lint-config-default#info=devDependencies)
11+
12+
13+
## What is npm-package-json-lint-config-default?
14+
15+
Shared configuration for npm-package-json-lint. Follow the instructions below to easily include this configuration in another project without having to duplicate the file.
16+
17+
## How do I install it?
18+
19+
First thing first, let's make sure you have the necessary pre-requisites.
20+
21+
### System Dependencies
22+
23+
#### Node
24+
25+
* [Node.js](https://nodejs.org/) - v4.2.0+
26+
* [npm](http://npmjs.com) - v2.14.7+
27+
28+
### Command
29+
30+
```bash
31+
npm install npm-package-json-lint-config-default --save-dev
32+
```
33+
34+
## Usage
35+
36+
Add the following to your `.npmpackagejsonlintrc.json` file:
37+
38+
```json
39+
{
40+
"extends": "npm-package-json-lint-config-default"
41+
}
42+
```
43+
44+
If you need to override a rule, your `.npmpackagejsonlintrc.json` file should look like the example below. All shared rules will be used, but `license-type` will be turned off.
45+
46+
```json
47+
{
48+
"extends": "npm-package-json-lint-config-default",
49+
"rules": {
50+
"license-type": "off"
51+
}
52+
}
53+
```
54+
55+
## Contributing
56+
57+
Please see [CONTRIBUTING.md](CONTRIBUTING.md).
58+
59+
## Release History
60+
61+
Please see [CHANGELOG.md](CHANGELOG.md).
62+
63+
## License
64+
65+
Copyright (c) 2017 Thomas Lindner. Licensed under the MIT license.

0 commit comments

Comments
 (0)