Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

[DOCS] Add contributing to README, and disable vscode autoformat #192

Merged
merged 4 commits into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ indent_size = 4
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

# yarn / npm uses 2 spaces when it dumps the file after a change
[package.json]
weirdpattern marked this conversation as resolved.
Show resolved Hide resolved
indent_size = 2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ versions.json
yarn.lock
/.vscode/*
!/.vscode/settings.json
!/.vscode/extensions.json
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ node_js:
- "8"
- "10"
- "11"
install: yarn
script:
- yarn lint
- yarn format-check
- yarn docs:check
- yarn test
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig"
],
"unwantedRecommendations": [
"hookyqr.beautify",
"dbaeumer.jshint"
]
}
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
// Format a file on save. A formatter must be available, the file must not be auto-saved, and editor must not be shutting down.
"editor.formatOnSave": true,

// An array of languages where Emmet abbreviations should not be expanded.
"emmet.excludeLanguages": [
"markdown",
Expand Down
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing

## Commenting and Discussing

***Don't be a douche.***
Consider the following when commenting:

- Everyone is a human (except for the bots).
- Everyone is freely providing their time for this project.
- Everyone wants to build the best tool.

## PR Requirements

For a PR to be merged, you must pass the following checks:

- there must be no lint errors - `yarn lint`
- the code must be formatted - `yarn format`
- your documentation must be up to date - `yarn docs-check`
- all tests must pass - `yarn test`

There is a commit hook which will help you follow this.
Travis will also automatically run these checks when you submit your PR (and will block us merging until you fix it).

## Adding/Changing a rule

When adding or changing a rule, you must:

- Ensure your feature / bug has an issue behind it.
- This just makes it easier for people to find information in future, because PRs aren't included in the default issue search.
- Ensure your changes are covered by tests.
- There's no hard and fast rule for how much testing is required, but try to cover as many bases as you can.
- Ensure your changes are documented in the `docs` folder. We're working to standardise how we document rules, but your docs should:
- describe what the rule does, and why you might enable it.
- (if any) outline the settings; how to configure them and what each one does
- have clear examples of valid and invalid code when using the rule. Bonus points for extra cases showing what each setting does.

When adding a rule, you must also add a link to the rule in the README.md.

## Submitting Issues

- If your issue relates to a rule, start your title with the rule name:
- `[no-unused-vars] False positive when fooing the bar`
- Search for the issue before you ask; we try hard to ensure it's easy to find existing issues.
- Follow the template.
- We've built it to reduce the chance of us going back to ask you for things.
- Don't be lazy and skip parts of it; we'll just ask you for that information anyway, so it'll only delay the process.
107 changes: 52 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
{
"name": "eslint-plugin-typescript",
"version": "0.14.0",
"description": "TypeScript plugin for ESLint",
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin"
],
"repository": "nzakas/eslint-plugin-typescript",
"author": "Nicholas C. Zakas",
"main": "lib/index.js",
"scripts": {
"lint": "eslint lib/ tests/",
"lint:fix": "eslint lib/ tests/ --fix",
"docs": "eslint-docs",
"docs:check": "eslint-docs check",
"format-no-write": "prettier-eslint lib/**/*.js tests/**/*.js --eslint-config-path=.eslintrc --eslint-ignore --prettier-ignore --eslint-path=node_modules/eslint --config=.prettierrc",
"format": "yarn format-no-write --write",
"format-check": "yarn format-no-write --list-different",
"mocha": "mocha tests --recursive --reporter=dot",
"pretest": "npm run lint",
"test": "mocha tests --recursive --reporter=dot",
"posttest": "npm run docs:check",
"precommit": "npm test && lint-staged"
},
"dependencies": {
"requireindex": "~1.2.0",
"typescript-eslint-parser": "^17.0.1"
},
"devDependencies": {
"eslint": "^5.9.0",
"eslint-config-eslint": "^5.0.1",
"eslint-config-prettier": "^3.3.0",
"eslint-docs": "^0.1.1",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^1.2.0",
"lint-staged": "^8.1.0",
"mocha": "^5.2.0",
"prettier-eslint-cli": "^4.7.1",
"typescript": "~2.9"
},
"peerDependencies": {
"eslint": ">=4.13.1 < 6"
},
"lint-staged": {
"*.js": [
"yarn format",
"git add"
]
},
"engines": {
"node": ">=6"
},
"license": "MIT"
"name": "eslint-plugin-typescript",
"version": "0.14.0",
"description": "TypeScript plugin for ESLint",
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin"
],
"repository": "nzakas/eslint-plugin-typescript",
"author": "Nicholas C. Zakas",
"main": "lib/index.js",
"scripts": {
"lint": "eslint lib/ tests/",
"lint:fix": "eslint lib/ tests/ --fix",
"docs": "eslint-docs",
"docs:check": "eslint-docs check",
"format-no-write": "prettier-eslint lib/**/*.js tests/**/*.js --eslint-config-path=.eslintrc --eslint-ignore --prettier-ignore --eslint-path=node_modules/eslint --config=.prettierrc",
"format": "yarn format-no-write --write",
"format-check": "yarn format-no-write --list-different",
"test": "mocha tests --recursive --reporter=dot",
"precommit": "yarn lint && yarn test && yarn docs:check && lint-staged"
},
"dependencies": {
"requireindex": "~1.2.0",
"typescript-eslint-parser": "^17.0.1"
},
"devDependencies": {
"eslint": "^5.9.0",
"eslint-config-eslint": "^5.0.1",
"eslint-config-prettier": "^3.3.0",
"eslint-docs": "^0.1.1",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^1.2.0",
"lint-staged": "^8.1.0",
"mocha": "^5.2.0",
"prettier-eslint-cli": "^4.7.1",
"typescript": "~2.9"
},
"peerDependencies": {
"eslint": ">=4.13.1 < 6"
},
"lint-staged": {
"*.js": [
"yarn format",
"git add"
]
},
"engines": {
"node": ">=6"
},
"license": "MIT"
}