-
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.
Merge pull request #1 from deejaygeroso/feature-v1.0.0-alpha-1
Feature v1.0.0 alpha 1
- Loading branch information
Showing
40 changed files
with
14,516 additions
and
1,502 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nrwl/nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nrwl/nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nrwl/nx/typescript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nrwl/nx/javascript"], | ||
"rules": {} | ||
} | ||
] | ||
} |
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,2 +1,3 @@ | ||
strict-peer-dependencies=false | ||
auto-install-peers=true | ||
node-linker=hoisted |
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,3 +1,23 @@ | ||
{ | ||
"singleQuote": true | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"endOfLine": "auto", | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true, | ||
"importOrder": [ | ||
"react(.*)$", | ||
"@react-helper/(.*)$", | ||
"<THIRD_PARTY_MODULES>", | ||
"^[./]" | ||
], | ||
"jsxBracketSameLine": true, | ||
"jsxSingleQuote": true, | ||
"parser": "typescript", | ||
"printWidth": 120, | ||
"proseWrap": "never", | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
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,7 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
|
||
"nrwl.angular-console", | ||
"esbenp.prettier-vscode" | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
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,30 @@ | ||
{ | ||
"editor.tabSize": 2, | ||
"editor.insertSpaces": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.format.enable": true, | ||
"eslint.alwaysShowStatus": true, | ||
"editor.detectIndentation": false, | ||
"typescript.validate.enable": false, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[html]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.tabSize": 2 | ||
}, | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.tabSize": 2 | ||
} | ||
} |
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
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
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,69 @@ | ||
const eslintSetting = { | ||
extends: ['airbnb', 'airbnb/hooks', 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-hooks'], | ||
globals: { | ||
page: true, | ||
browser: true, | ||
context: true, | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
/* | ||
* Disabling `import/prefer-default-export` gives us the flexibility to | ||
* use `export { default as Module } from './Module'` in index.ts files. | ||
* As index.ts file grows having to read 1 line of exported module gives better code readability. | ||
*/ | ||
'import/prefer-default-export': ['off'], | ||
/* | ||
* Disabling this rule makes our index.ts file more readable. | ||
* This should be disabled along with `import/prefer-default-export`. | ||
*/ | ||
'import/no-unresolved': ['off'], | ||
/* | ||
* For the most part of our code, we always know what files we are importing. | ||
* Removing this won't hurt a lot but definitely will make our code much more cleaner. | ||
*/ | ||
'import/extensions': ['off'], | ||
/* | ||
* Suppress errors for missing 'import React' in files. | ||
* React version detect needs to be configured along side with this. | ||
*/ | ||
'react/react-in-jsx-scope': 'off', | ||
/* | ||
* This is an opinionated rule. Prettier should handle reordering of imports for better dev experience. | ||
*/ | ||
'import/order': 'off', | ||
/* | ||
* We expect react to have .ts or .tsx extension. | ||
* Setting this overrides .js or .jsx rule extension. | ||
*/ | ||
'react/jsx-filename-extension': ['error', { extensions: ['.ts', '.tsx'] }], | ||
/* | ||
* We are just basically overriding the default setting which was set to `function-declaration`. | ||
* For this rule, only arrow functions for named components. | ||
* This enforces code consistency type of function components. | ||
*/ | ||
'react/function-component-definition': [ | ||
'error', | ||
{ | ||
namedComponents: 'arrow-function', | ||
}, | ||
], | ||
/* | ||
* Writing return every function is just an extra work. | ||
* Setting return type to void is much more readable. | ||
*/ | ||
'consistent-return': 'off', | ||
}, | ||
settings: { | ||
react: { | ||
/* | ||
* Tells eslint-plugin-react to automatically detect the version of React to use. | ||
*/ | ||
version: 'detect', | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = eslintSetting; |
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,13 @@ | ||
{ | ||
"name": "@react-helper/eslint-config-airbnb", | ||
"version": "1.0.0", | ||
"main": "./index.js", | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.51.0", | ||
"@typescript-eslint/parser": "^5.51.0", | ||
"eslint": "^8.34.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-typescript-sort-keys": "^2.1.0" | ||
} | ||
} |
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,40 @@ | ||
module.exports = { | ||
extends: [ | ||
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react | ||
'plugin:react-hooks/recommended', // Enforces Rules of React Hooks | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin | ||
'prettier', // Turns off all rules that are unnecessary or might conflict with Prettier. | ||
], | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, // Allows for the parsing of JSX | ||
}, | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
}, | ||
plugins: ['react-hooks', '@typescript-eslint', 'typescript-sort-keys'], | ||
root: true, | ||
rules: { | ||
'no-console': ['warn', { allow: ['info', 'error'] }], | ||
'react/jsx-sort-props': [ | ||
'error', | ||
{ | ||
callbacksLast: true, | ||
ignoreCase: true, | ||
noSortAlphabetically: false, | ||
shorthandFirst: false, | ||
shorthandLast: true, | ||
}, | ||
], | ||
semi: ['error', 'never'], | ||
'sort-keys': ['error', 'asc', { caseSensitive: false }], | ||
'typescript-sort-keys/interface': 'error', | ||
'typescript-sort-keys/string-enum': 'error', | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use | ||
}, | ||
}, | ||
}; |
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,14 @@ | ||
{ | ||
"name": "@react-helper/eslint-config", | ||
"version": "1.1.0", | ||
"main": "./index.js", | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.51.0", | ||
"@typescript-eslint/parser": "^5.51.0", | ||
"eslint": "^8.34.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-typescript-sort-keys": "^2.1.0" | ||
} | ||
} |
Oops, something went wrong.