Skip to content

Commit

Permalink
Merge pull request #65 from RomanoLab/wip/issue-62/beautify-code
Browse files Browse the repository at this point in the history
style: change style settings for better format standard
  • Loading branch information
JDRomano2 authored Aug 10, 2023
2 parents 61951ee + 8cf9f63 commit 2df533b
Show file tree
Hide file tree
Showing 6 changed files with 6,651 additions and 3,495 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

# Python files
[*.{py, pyi, pyc, pyd, pyo, pyw, pyz}]
indent_size = 4
87 changes: 63 additions & 24 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,27 +1,66 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": ["prettier", "react"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"prettier/prettier": ["error"],
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-indent-props": [2, 4],
"react/jsx-indent": [2, 4],
"react/jsx-one-expression-per-line": [0],
"react/prefer-stateless-function": [1],
"react/static-property-placement": [1, "property assignment"]
"extends": [
"airbnb",
"airbnb/hooks",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/recommended"
// "plugin:node/recommended"
],
"plugins": ["prettier", "react", "import"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"prettier/prettier": ["error"],

"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-indent-props": [2, 4],
"react/jsx-indent": [2, 4],
"react/jsx-one-expression-per-line": [0],
"react/prefer-stateless-function": [1],
"react/static-property-placement": [1, "property assignment"],
"react/no-multi-comp": ["error", { "ignoreStateless": true }],

"semi": 2,
"comma-dangle": "error",
"no-underscore-dangle": "error",
"space-before-blocks": "error",
"keyword-spacing": "error",
"spaced-comment": "error",
"quotes": ["error", "single"],
"prefer-template": "warn",
"template-curly-spacing": ["error", "never"],
"jsx-quotes": ["warn", "prefer-double"],
"camelcase": ["error", { "properties": "always" }],
"no-unused-vars": ["warn"],

"import/prefer-default-export": ["warn", { "target": "any" }],
"import/no-duplicates": ["error", { "considerQueryString": true }],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
11 changes: 6 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5"
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"jsxSingleQuote": false
}
59 changes: 28 additions & 31 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
{
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"python.pythonPath": "C:\\Users\\jdr2160\\Miniconda3\\envs\\comptox_ai\\python.exe",
"restructuredtext.confPath": "${workspaceFolder}\\docs\\source",
"restructuredtext.languageServer.disabled": true,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"python.pythonPath": "C:\\Users\\jdr2160\\Miniconda3\\envs\\comptox_ai\\python.exe",
"restructuredtext.confPath": "${workspaceFolder}\\docs\\source",
"restructuredtext.languageServer.disabled": true,

// Javascript: Prettier
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// Typescript formatter: Prettier
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// Editor indent setting
"editor.tabSize": 4,
"editor.insertSpaces": true,
// Javascript: Prettier
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// Typescript formatter: Prettier
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},

// Python Docstring formatter: AutoDocstring NumPy
"autoDocstring.docstringFormat": "numpy",
// Python Docstring formatter: AutoDocstring NumPy
"autoDocstring.docstringFormat": "numpy",

// Python formatter: PEP8
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.autopep8"
},
"python.formatting.provider": "none",
// Python formatter: PEP8
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.autopep8"
},
"python.formatting.provider": "none",

// Python testing: PyTest
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
// Python testing: PyTest
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
Loading

0 comments on commit 2df533b

Please sign in to comment.