-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18de1be
commit b04c890
Showing
4 changed files
with
148 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# eslint-config-tjw-base | ||
# eslint-config-tjw-base | ||
|
||
The Jared Wilcurt's base ESLint rules | ||
|
||
|
||
## Using this | ||
|
||
1. `npm install --save-dev eslint-config-tjw-base` | ||
1. In your `.eslitrc.js` add `tjw-base` to your `extends` like so: | ||
```js | ||
module.exports = { | ||
'extends': [ | ||
'tjw-base' | ||
] | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
// JS | ||
module.exports = { | ||
'parserOptions': { | ||
'sourceType': 'module' | ||
}, | ||
'env': { | ||
'browser': true, | ||
'node': true | ||
}, | ||
'rules': { | ||
'arrow-parens': [ | ||
'off' | ||
], | ||
'brace-style': [ | ||
'error', | ||
'1tbs', | ||
{ | ||
'allowSingleLine': true | ||
} | ||
], | ||
'comma-dangle': [ | ||
'error', | ||
'never' | ||
], | ||
'comma-spacing': [ | ||
'error', | ||
{ | ||
'before': false, | ||
'after': true | ||
} | ||
], | ||
'comma-style': [ | ||
'error', | ||
'last' | ||
], | ||
'curly': [ | ||
'error' | ||
], | ||
// allow async-await | ||
'generator-star-spacing': [ | ||
'off' | ||
], | ||
// 2 space indentation (should match .editorconfig) | ||
'indent': [ | ||
'error', | ||
2, | ||
{ | ||
'SwitchCase': 1 | ||
} | ||
], | ||
'keyword-spacing': [ | ||
'error', | ||
{ | ||
'before': true, | ||
'after': true | ||
} | ||
], | ||
// allow debugger during development | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-multi-spaces': [ | ||
'error' | ||
], | ||
'no-unused-vars': [ | ||
'error' | ||
], | ||
'no-undef': [ | ||
'error' | ||
], | ||
// Only allow let and const, no var | ||
'no-var': [ | ||
'error' | ||
], | ||
'object-curly-spacing': [ | ||
'error', | ||
'always' | ||
], | ||
'one-var': [ | ||
'error', | ||
'never' | ||
], | ||
'quotes': [ | ||
'error', | ||
'single' | ||
], | ||
'semi': [ | ||
'error', | ||
'always' | ||
], | ||
'space-before-blocks': [ | ||
'error', | ||
'always' | ||
], | ||
'space-before-function-paren': [ | ||
'error', | ||
'always' | ||
], | ||
'space-in-parens': [ | ||
'error', | ||
'never' | ||
], | ||
'space-infix-ops': [ | ||
'error' | ||
], | ||
'spaced-comment': [ | ||
'error', | ||
'always' | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "eslint-config-tjw-base", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"description": "The Jared Wilcurt's base linting rules", | ||
"author": "The Jared Wilcurt", | ||
"keywords": [ | ||
"tjw", | ||
"eslint", | ||
"lint" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tjw-lint/eslint-config-tjw-base.git" | ||
}, | ||
"homepage": "https://github.com/tjw-lint/eslint-config-tjw-base#readme", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/tjw-lint/eslint-config-tjw-base/issues" | ||
} | ||
} |