mirror of
https://github.com/jakejarvis/eslint-config.git
synced 2025-04-28 06:50:30 -04:00
Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
29be6e9c26 | |||
5ed0ff58f6 | |||
b5c20f22a2 | |||
a56231d6a4 | |||
ed541485b3 | |||
fcb55a20bd | |||
86a3091d71 | |||
64cdd08b12 | |||
f97840fbd8 | |||
58062a0bc0 | |||
cbe2b1e5fa | |||
9ba98bac80 | |||
02f185c144 | |||
98810d0f43 | |||
13a3f2a128 | |||
673ac6003d | |||
15176a732a | |||
aeb4adad4d | |||
5f2cd50ec7 | |||
7b00cc660b | |||
579eb4fa56 | |||
716a5f7559 | |||
0782ebe868 | |||
4c7d1c6f54 | |||
df5e305100 | |||
2d0d511552 | |||
018f036e80 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
node_modules/
|
||||
package-lock.json
|
||||
|
@ -5,7 +5,7 @@
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
yarn add --dev eslint @jakejarvis/eslint-config eslint-plugin-compat eslint-plugin-import
|
||||
yarn add --dev eslint "@jakejarvis/eslint-config@*"
|
||||
```
|
||||
|
||||
## Usage
|
||||
@ -15,8 +15,12 @@ yarn add --dev eslint @jakejarvis/eslint-config eslint-plugin-compat eslint-plug
|
||||
```json5
|
||||
{
|
||||
"extends": [
|
||||
"@jakejarvis"
|
||||
"@jakejarvis/eslint-config"
|
||||
],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
// Project-specific overrides...
|
||||
}
|
||||
|
199
index.js
199
index.js
@ -1,101 +1,104 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:compat/recommended",
|
||||
"plugin:import/recommended",
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: "module",
|
||||
ecmaVersion: 2018,
|
||||
ecmaFeatures: {
|
||||
"jsx": true,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
"es6": true,
|
||||
},
|
||||
export default [{
|
||||
rules: {
|
||||
// Stylistic:
|
||||
"brace-style": "error",
|
||||
"camelcase": ["error", {
|
||||
"properties": "never",
|
||||
"ignoreDestructuring": true,
|
||||
}],
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
"curly": ["error", "multi-or-nest", "consistent"],
|
||||
"func-call-spacing": "error",
|
||||
"max-len": ["warn", {
|
||||
"code": 120,
|
||||
"tabWidth": 2,
|
||||
"ignoreUrls": true,
|
||||
"ignoreComments": false,
|
||||
"ignoreStrings": true,
|
||||
"ignoreRegExpLiterals": true,
|
||||
"ignoreTemplateLiterals": true,
|
||||
}],
|
||||
"no-multiple-empty-lines": ["error", { "max": 1 }],
|
||||
"no-tabs": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"one-var": ["error", {
|
||||
"var": "never",
|
||||
"let": "never",
|
||||
"const": "never",
|
||||
}],
|
||||
"operator-linebreak": ["error", "after"],
|
||||
"padded-blocks": ["error", "never"],
|
||||
"quote-props": ["error", "consistent"],
|
||||
"quotes": ["error", "double", {
|
||||
"avoidEscape": true,
|
||||
"allowTemplateLiterals": true,
|
||||
}],
|
||||
"semi": "error",
|
||||
"semi-spacing": "error",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": ["error", {
|
||||
"named": "never",
|
||||
"anonymous": "always",
|
||||
"asyncArrow": "always",
|
||||
}],
|
||||
"spaced-comment": ["error", "always", {
|
||||
"line": {
|
||||
"markers": ["/"],
|
||||
"exceptions": ["-", "+"],
|
||||
},
|
||||
"block": {
|
||||
"markers": ["!"],
|
||||
"exceptions": ["*"],
|
||||
"balanced": true,
|
||||
},
|
||||
}],
|
||||
"template-tag-spacing": ["error", "never"],
|
||||
"brace-style": "error",
|
||||
|
||||
// ES6:
|
||||
"arrow-body-style": ["error", "as-needed", {
|
||||
"requireReturnForObjectLiteral": false,
|
||||
}],
|
||||
"arrow-parens": ["error", "always"],
|
||||
"arrow-spacing": ["error", { "before": true, "after": true }],
|
||||
"no-confusing-arrow": ["error", { "allowParens": true }],
|
||||
"no-var": "error",
|
||||
"prefer-const": ["error", {
|
||||
"destructuring": "any",
|
||||
"ignoreReadBeforeAssign": true,
|
||||
}],
|
||||
"prefer-destructuring": ["error", {
|
||||
"VariableDeclarator": {
|
||||
"array": false,
|
||||
"object": true,
|
||||
},
|
||||
"AssignmentExpression": {
|
||||
"array": true,
|
||||
"object": false,
|
||||
},
|
||||
}],
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"template-curly-spacing": "error",
|
||||
camelcase: ["error", {
|
||||
properties: "never",
|
||||
ignoreDestructuring: true,
|
||||
}],
|
||||
|
||||
"comma-dangle": ["error", {
|
||||
arrays: "always-multiline",
|
||||
objects: "always-multiline",
|
||||
imports: "always-multiline",
|
||||
exports: "always-multiline",
|
||||
functions: "never",
|
||||
}],
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
curly: ["error", "multi-line"],
|
||||
"func-call-spacing": "error",
|
||||
|
||||
"no-multiple-empty-lines": ["error", {
|
||||
max: 1,
|
||||
}],
|
||||
|
||||
"no-tabs": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
|
||||
"one-var": ["error", {
|
||||
var: "never",
|
||||
let: "never",
|
||||
const: "never",
|
||||
}],
|
||||
|
||||
"operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before" } }],
|
||||
"padded-blocks": ["error", "never"],
|
||||
"quote-props": ["error", "as-needed"],
|
||||
|
||||
quotes: ["error", "double", {
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: true,
|
||||
}],
|
||||
|
||||
semi: "error",
|
||||
"semi-spacing": "error",
|
||||
"space-before-blocks": "error",
|
||||
|
||||
"space-before-function-paren": ["error", {
|
||||
named: "never",
|
||||
anonymous: "always",
|
||||
asyncArrow: "always",
|
||||
}],
|
||||
|
||||
"spaced-comment": ["error", "always", {
|
||||
line: {
|
||||
markers: ["/"],
|
||||
exceptions: ["-", "+"],
|
||||
},
|
||||
|
||||
block: {
|
||||
markers: ["!"],
|
||||
exceptions: ["*"],
|
||||
balanced: true,
|
||||
},
|
||||
}],
|
||||
|
||||
"template-tag-spacing": ["error", "never"],
|
||||
|
||||
"arrow-parens": ["error", "always"],
|
||||
|
||||
"arrow-spacing": ["error", {
|
||||
before: true,
|
||||
after: true,
|
||||
}],
|
||||
|
||||
"no-confusing-arrow": ["error", {
|
||||
allowParens: true,
|
||||
}],
|
||||
|
||||
"no-var": "error",
|
||||
|
||||
"prefer-const": ["error", {
|
||||
destructuring: "any",
|
||||
ignoreReadBeforeAssign: true,
|
||||
}],
|
||||
|
||||
"prefer-destructuring": ["error", {
|
||||
VariableDeclarator: {
|
||||
array: false,
|
||||
object: true,
|
||||
},
|
||||
|
||||
AssignmentExpression: {
|
||||
array: true,
|
||||
object: false,
|
||||
},
|
||||
}],
|
||||
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"template-curly-spacing": "error",
|
||||
},
|
||||
};
|
||||
}];
|
||||
|
1076
package-lock.json
generated
Normal file
1076
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@ -1,46 +1,30 @@
|
||||
{
|
||||
"name": "@jakejarvis/eslint-config",
|
||||
"version": "1.0.0",
|
||||
"description": "@jakejarvis's shared eslint config.",
|
||||
"version": "4.0.7",
|
||||
"description": "My ESLint config. Inspired heavily by eslint-config-google and moderately by eslint-config-airbnb.",
|
||||
"license": "MIT",
|
||||
"repository": "jakejarvis/eslint-config",
|
||||
"author": {
|
||||
"name": "Jake Jarvis",
|
||||
"email": "jake@jarv.is",
|
||||
"url": "https://jarv.is/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jakejarvis/eslint-config.git"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint --fix ."
|
||||
},
|
||||
"dependencies": {},
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-compat": "^3.13.0",
|
||||
"eslint-plugin-import": "^2.24.2"
|
||||
"eslint": "^9.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-compat": "^3.13.0",
|
||||
"eslint-plugin-import": "^2.24.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "./index.js",
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
"eslint": "^7 || ^8 || >=9"
|
||||
},
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"eslint",
|
||||
"eslint-config",
|
||||
"lint",
|
||||
"config"
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user