Skip to content

Commit

Permalink
feat: initial features
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Vaillant authored and thomvaill committed Dec 10, 2020
1 parent df5b145 commit 03550dc
Show file tree
Hide file tree
Showing 323 changed files with 36,918 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
85 changes: 85 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
module.exports = {
root: true,
env: {
es2021: true
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
project: "./tsconfig.json"
},
ignorePatterns: ["**/*.js", "**/*.d.ts", "dist", "node_modules"],
plugins: ["jest", "sonarjs", "promise", "@typescript-eslint", "react"],
extends: [
"eslint:recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:sonarjs/recommended",
"plugin:promise/recommended",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"prettier/@typescript-eslint",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"airbnb/hooks",
"prettier/react"
],
rules: {
"import/prefer-default-export": "off", // @adr 20200927-avoid-default-exports
"import/no-default-export": "error", // @adr 20200927-avoid-default-exports
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
"sonarjs/no-duplicate-string": "off",
"react/prefer-stateless-function": [2, { ignorePureComponents: false }],
"react/function-component-definition": [
2,
{
namedComponents: "function-declaration",
unnamedComponents: "arrow-function"
}
],
"react/require-default-props": [2, { ignoreFunctionalComponents: true }], // DefaultProps are deprecated for functional components (https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md)
"react/jsx-props-no-spreading": "off", // For HOC
"no-void": [2, { allowAsStatement: true }], // For React.useEffect() with async functions
"react/display-name": "off"
},
overrides: [
{
files: ["*.ts", "*.tsx"] // Forces Jest to include these files
},
{
files: "*.tsx",
rules: {
"sonarjs/cognitive-complexity": [2, 18], // React functions are usually more complex
"@typescript-eslint/explicit-module-boundary-types": "off" // @adr web/20200927-avoid-react-fc-type
}
},
{
files: ["src/**/*.stories.tsx"], // Storybook
rules: {
"import/no-extraneous-dependencies": "off",
"import/no-default-export": "off",
"react/function-component-definition": "off"
}
},
{
files: "*", // All non-React files
excludedFiles: "*.tsx",
rules: {
"react/static-property-placement": "off"
}
},
{
files: "**.test.ts", // Jest
rules: {
"max-classes-per-file": "off",
"import/no-extraneous-dependencies": "off",
"no-new": "off",
"no-empty": "off"
}
}
]
};
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: "Bug Report"
about: "Report a bug"
labels: bug
---

# Bug Report

## Description

<!-- Write a clear and concise description of what the bug is -->

## Steps to Reproduce

<!-- Provide a link to a live example or a repository -->
<!-- And/or write the exact steps to reproduce the bug -->
<!-- Include code or configuration, if relevant -->

1. Step 1
2. Step 2
3. ...

## Expected Behavior

<!-- Tell us what should happen instead -->

## Context

<!-- How has this issue affected you? What are you trying to accomplish? -->
<!-- Providing context helps us come up with a solution that is most useful in the real world -->

## Environment

<!-- Include as many relevant details about the environment you experienced the bug in -->

- Log4brains version:
- Node.js version:
- OS and its version:
- Browser information:

## Possible Solution <!-- Optional -->

<!-- Optional. Suggest a fix/reason for the bug -->
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
contact_links:
- name: Give your feedback 📣
url: https://github.com/thomvaill/log4brains/discussions/new?category=Feedback
about: Give your feedback (positive or negative!) on the BETA version
- name: Ask a question
url: https://github.com/thomvaill/log4brains/discussions
about: Ask questions and discuss with other community members
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "Feature Request"
about: "Suggest new features and changes"
labels: feature
---

# Feature Request

## Feature Suggestion

<!-- Tell us how we could improve your experience -->

## Context

<!-- What are you trying to accomplish? -->
<!-- Providing context helps us come up with a solution that is most useful in the real world -->

## Possible Implementation <!-- Optional -->

<!-- Optional. Suggest an implementation for this feature -->
<!-- Please also note that PRs are welcome! -->
<!-- Check out CONTRIBUTING.md to get started -->
Loading

0 comments on commit 03550dc

Please sign in to comment.