Skip to content

Commit 99cb638

Browse files
authored
Update (#1)
* Updated airbnb and eslint * Updated based on traitify-widgets testing * Added files to package.json * Version
1 parent ec253c8 commit 99cb638

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ module.exports = {
4242
}], // Whitespace - Preference
4343
"lines-between-class-members": ["error", "never"],
4444
"no-else-return": "off", // Allows more functional styles
45+
"no-lonely-if": "off", // Allows more readable conditions
4546
"no-multiple-empty-lines": ["error", {max: 1, maxBOF: 0, maxEOF: 0}], // Little stricter
47+
"no-promise-executor-return": "off", // Makes it hard to return early for conditions
4648
"no-underscore-dangle": "off", // Doesn't allow `const key = _key.toLowerCase()`
4749
"no-unused-expressions": ["error", {allowShortCircuit: true, allowTernary: true}],
4850
"object-curly-newline": ["error", {multiline: true, consistent: true}],
@@ -62,6 +64,10 @@ module.exports = {
6264
"quote-props": ["error", "consistent-as-needed", {keywords: false}],
6365
"quotes": ["error", "double", {allowTemplateLiterals: true}],
6466
"react/destructuring-assignment": "off", // Overactive and solved by prefer-destructuring
67+
"react/function-component-definition": ["error", {
68+
namedComponents: ["function-declaration", "function-expression"],
69+
unnamedComponents: "arrow-function"
70+
}], // Allows simple arrow components
6571
"react/jsx-boolean-value": ["error", "always"], // Prefer explicit
6672
"react/jsx-filename-extension": "off", // Unnecessary
6773
"react/jsx-one-expression-per-line": "off", // Creates unnecessary white space issues

package.json

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
2-
"name": "eslint-config-traitify",
3-
"version": "0.2.0",
4-
"description": "Traitify's base ESLint config",
5-
"main": "index.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
2+
"author": "Tom Prats <[email protected]> (https://www.tomify.me)",
3+
"bugs": {
4+
"url": "https://github.com/traitify/eslint-config-traitify/issues"
85
},
9-
"repository": {
10-
"type": "git",
11-
"url": "git+https://github.com/traitify/eslint-config-traitify.git"
6+
"dependencies": {
7+
"@babel/eslint-parser": "7.x",
8+
"eslint-config-airbnb": "19.x",
9+
"eslint-import-resolver-webpack": "0.x"
1210
},
11+
"description": "Traitify's base ESLint config",
12+
"files": [
13+
"index.js",
14+
"package.json",
15+
"README.md"
16+
],
17+
"homepage": "https://github.com/traitify/eslint-config-traitify#readme",
1318
"keywords": [
1419
"config",
1520
"eslint",
@@ -18,19 +23,19 @@
1823
"styleguide",
1924
"traitify"
2025
],
21-
"author": "Tom Prats <[email protected]> (https://www.tomify.me)",
2226
"license": "MIT",
23-
"bugs": {
24-
"url": "https://github.com/traitify/eslint-config-traitify/issues"
25-
},
26-
"homepage": "https://github.com/traitify/eslint-config-traitify#readme",
27-
"dependencies": {
28-
"@babel/eslint-parser": "7.x",
29-
"eslint-config-airbnb": "18.x",
30-
"eslint-import-resolver-webpack": "0.x"
31-
},
27+
"main": "index.js",
28+
"name": "eslint-config-traitify",
3229
"peerDependencies": {
3330
"@babel/eslint-plugin": "7.x",
34-
"eslint": "7.x"
35-
}
31+
"eslint": "8.x"
32+
},
33+
"repository": {
34+
"type": "git",
35+
"url": "git+https://github.com/traitify/eslint-config-traitify.git"
36+
},
37+
"scripts": {
38+
"test": "echo \"Error: no test specified\" && exit 1"
39+
},
40+
"version": "0.3.0"
3641
}

0 commit comments

Comments
 (0)