Skip to content

Commit

Permalink
Merge pull request #280 from bcnmy/features/SMA-86-code-style
Browse files Browse the repository at this point in the history
Features/sma 86 code style
  • Loading branch information
livingrockrises authored Sep 11, 2023
2 parents 0d099e4 + 3772ae2 commit f02c6c4
Show file tree
Hide file tree
Showing 103 changed files with 2,306 additions and 2,672 deletions.
14 changes: 14 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ignore node_modules in the root and in all packages
**/node_modules/

# Ignore build or dist directories
**/dist/
**/build/
**/coverage/

# Ignore any auto-generated files
**/typechain/

# Ignore any config files
*.config.js
*.config.ts
42 changes: 33 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'plugin:prettier/recommended' // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parser: "@typescript-eslint/parser",
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "airbnb-typescript/base", "plugin:prettier/recommended"],
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module' // Allows for the use of imports
}
}
ecmaVersion: 2020,
sourceType: "module",
project: './tsconfig.eslint.json',
},
env: {
node: true,
es6: true,
},
plugins: ["@typescript-eslint", "prettier", "security", "import"],
rules: {
"prettier/prettier": "error",
"no-var": "error",
"prefer-const": "error",
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"no-console": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"security/detect-object-injection": "warn",
"security/detect-unsafe-regex": "error",
},
settings: {},
overrides: [
{
files: ["*.ts", "*.tsx"],
rules: {
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
},
},
],
};
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
10 changes: 5 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Please delete options that are not relevant.

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration


**Test Configuration**:
* Firmware version:
* Hardware:
* Toolchain:
* SDK:

- Firmware version:
- Hardware:
- Toolchain:
- SDK:

# Checklist:

Expand Down
4 changes: 1 addition & 3 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"include": [
"src/**/*.ts"
]
"include": ["src/**/*.ts"]
}
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ignore node_modules in the root and in all packages
**/node_modules/

# Ignore build or dist directories
**/dist/
**/build/
**/coverage/

# Ignore any auto-generated files
**/typechain/

# Ignore any config files
*.config.js
*.config.ts
9 changes: 5 additions & 4 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true,
"trailingComma": "none"
"printWidth": 150,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"tabWidth": 2
}
Loading

0 comments on commit f02c6c4

Please sign in to comment.