Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Added react config #2

Open
wants to merge 1 commit into
base: reborn
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
20 changes: 14 additions & 6 deletions eslint-config-base/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = {
'standard',
'plugin:import/recommended',
'plugin:import/errors',
'plugin:import/warnings'
'plugin:import/warnings',
'prettier'
],
plugins: [
'import',
Expand All @@ -25,6 +26,10 @@ module.exports = {
],
parserOptions: {
sourceType: 'script',
project: true,
},
rules: {
'@typescript-eslint/strict-boolean-expressions': 'off',
},
},
{
Expand All @@ -33,13 +38,16 @@ module.exports = {
extends: ['plugin:@html-eslint/recommended'],
}
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
// "semi": [2, "always"],
// "space-before-function-paren": ["error", {
// "anonymous": "never",
// "named": "never",
// "asyncArrow": "always"
// }],

indent: ['error', 2],
'prettier/prettier': 'off',
// 'prettier/prettier': 'off',

'comma-dangle': ['error', {
objects: 'always',
Expand Down
7 changes: 4 additions & 3 deletions eslint-config-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jetrockets/eslint-config-base",
"version": "0.1.1",
"version": "0.1.2",
"description": "Base config file",
"homepage": "https://github.com/jetrockets/eslint-config#readme",
"bugs": {
Expand All @@ -26,9 +26,10 @@
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-json-format": "^2.0.1",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-promise": "^6.0.0"
"eslint-plugin-promise": "^6.0.0",
"prettier": "^3.0.3"
},
"devDependencies": {
"eslint": "^8.47.0"
}
}
}
9 changes: 9 additions & 0 deletions eslint-config-base/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions eslint-config-react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module.exports = {
parser: '@babel/eslint-parser',
extends: [
'@jetrockets/base'
],
plugins: ['react'],
overrides: [
{
files: ['*.jsx', '*.tsx'],
extends: [
'standard-jsx',
'standard-react'
],
}
],
rules: {
'import/no-unresolved': 'error',
'import/order': [
'error',
{
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before',
}
],
pathGroupsExcludedImportTypes: ['react'],
'newlines-between': 'always',
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling']
],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
}
],
},
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', '', 'src/'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
}
3 changes: 3 additions & 0 deletions eslint-config-react/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const eslintrc = require('./.eslintrc.js')

module.exports = eslintrc
28 changes: 28 additions & 0 deletions eslint-config-react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@jetrockets/eslint-config-react",
"version": "0.1.0",
"description": "Base react eslint format",
"homepage": "https://github.com/jetrockets/eslint-config#readme",
"bugs": {
"url": "https://github.com/jetrockets/eslint-config/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jetrockets/eslint-config.git"
},
"license": "ISC",
"author": "Maksim Romanov",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@babel/core": "^7.22.11",
"@babel/eslint-parser": "^7.22.11",
"@jetrockets/eslint-config-base": "file:/Users/ivanmerkushkin/workspace/jetrockets-eslint/eslint-config/eslint-config-base/jetrockets-eslint-config-base-0.1.2.tgz",
"eslint-config-standard-jsx": "^11.0.0",
"eslint-config-standard-react": "^13.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.33.2"
}
}
Loading