Skip to content

Commit

Permalink
Merge pull request #1051 from flexn-io/chore/linting
Browse files Browse the repository at this point in the history
chore: linting
  • Loading branch information
pavjacko committed Jun 27, 2023
2 parents e3909a8 + e6d7ffc commit 1eaa00b
Show file tree
Hide file tree
Showing 368 changed files with 9,384 additions and 11,201 deletions.
121 changes: 2 additions & 119 deletions .eslintrc.js
@@ -1,123 +1,6 @@
module.exports = {
extends: ['@flexn/eslint-config', 'prettier'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
'import/core-modules': ['@flexn/eslint-config'],
},
parser: '@babel/eslint-parser',
extends: ['airbnb'],
env: {
node: true,
browser: true,
es6: true,
jest: true,
mocha: true
},
parserOptions: {
requireConfigFile: false,
ecmaFeatures: {
experimentalObjectRestSpread: true
},
babelOptions: {
presets: ['@babel/preset-react']
}
},
plugins: ['jest', 'detox', 'mocha'],
rules: {
//= ===========
'function-paren-newline': 'off',
'arrow-parens': 'off',
'no-multiple-empty-lines': 'off',
'function-call-argument-newline': 'off',
'default-param-last': 'off',
'no-promise-executor-return': 'off',
'react/destructuring-assignment': 'off',
'react/function-component-definition': 'off',
'max-classes-per-file': 'off',
'import/no-relative-packages': 'off',
'import/extensions': 'off',
'react/no-unstable-nested-components': 'off',
'react/jsx-curly-brace-presence': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-wrap-multilines': 'off',
'prefer-object-spread': 'off',
'react/jsx-no-constructed-context-values': 'off',
'react/prop-types': 'off',
//= ===========
'no-unused-vars': ['error'],
'arrow-body-style': ['warn', 'as-needed'],
'import/no-cycle': ['warn'],
camelcase: 'off',
'class-methods-use-this': 'off',
'consistent-return': 0,
indent: ['error', 4, { SwitchCase: 1 }],
'new-cap': ['error', { capIsNew: false }],
'no-duplicate-imports': 'off',
'no-param-reassign': [
'error',
{ ignorePropertyModificationsFor: ['el', 'ref', 'event'] }
],
'no-plusplus': 'off',
'no-shadow': [
'error',
{ builtinGlobals: false, hoist: 'functions', allow: ['describe'] }
],
'no-use-before-define': 0,
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'nonblock-statement-body-position': 0,
'react/jsx-filename-extension': ['error', { extensions: ['.js'] }],
'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
'react/require-extension': 'off',
'react/sort-comp': [
'error',
{
order: [
'type-annotations',
'static-methods',
'lifecycle',
'/^on.+$/',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render'
]
}
],
'object-curly-newline': [
'error',
{
ObjectExpression: {
minProperties: 6,
multiline: true,
consistent: true
},
ObjectPattern: {
minProperties: 6,
multiline: true,
consistent: true
}
}
],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-duplicates': 'error',
'import/no-named-as-default': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/no-noninteractive-tabindex': 'off',
'jsx-a11y/media-has-caption': 'off',
'jsx-a11y/mouse-events-have-key-events': 'off',
'comma-dangle': ['error', 'only-multiline'],
'no-underscore-dangle': 'off',
'mocha/no-exclusive-tests': 'error',
'prefer-destructuring': ['error', { object: true, array: false }],
'prefer-promise-reject-errors': 'off',
'max-len': [
'warn',
{ code: 120, ignoreComments: true, ignoreStrings: true }
],
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix']
}
};
146 changes: 73 additions & 73 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,81 +1,81 @@
## Description
## Description

- Describe the nature of the work / fix
- Describe the nature of the work / fix

## Breaking Changes

- PRs should not introduce breaking changes to existing functionality
- if breaking change cannot be avoided it has to be introduced in 2 phases (release cycles of 0.x.0)
- `0.x.0` Add new functionality + add `DEPRECATED` warning to existing fuctionality
- `0.[x+1].0` Remove deprecated functionality
## I have tested my changes on:
ReNative project directly:
* [ ] ios simulator
* [ ] ios device
* [ ] android simulator
* [ ] android device
* [ ] web browser
* [ ] tvos simulator
* [ ] tvos device
* [ ] androidtv simulator
* [ ] androidtv device
* [ ] androidwear simulator
* [ ] androidwear device
* [ ] tizen simulator
* [ ] tizen device
* [ ] tizenmobile simulator
* [ ] tizenwatch device
* [ ] webos simulator
* [ ] webos device
* [ ] macos
* [ ] windows
* [ ] chromecast device
- PRs should not introduce breaking changes to existing functionality
- if breaking change cannot be avoided it has to be introduced in 2 phases (release cycles of 0.x.0)
- `0.x.0` Add new functionality + add `DEPRECATED` warning to existing fuctionality
- `0.[x+1].0` Remove deprecated functionality

## I have tested my changes on:

ReNative project directly:

- [ ] ios simulator
- [ ] ios device
- [ ] android simulator
- [ ] android device
- [ ] web browser
- [ ] tvos simulator
- [ ] tvos device
- [ ] androidtv simulator
- [ ] androidtv device
- [ ] androidwear simulator
- [ ] androidwear device
- [ ] tizen simulator
- [ ] tizen device
- [ ] tizenmobile simulator
- [ ] tizenwatch device
- [ ] webos simulator
- [ ] webos device
- [ ] macos
- [ ] windows
- [ ] chromecast device

New project:
* [ ] ios simulator
* [ ] ios device
* [ ] android simulator
* [ ] android device
* [ ] web browser
* [ ] tvos simulator
* [ ] tvos device
* [ ] androidtv simulator
* [ ] androidtv device
* [ ] androidwear simulator
* [ ] androidwear device
* [ ] tizen simulator
* [ ] tizen device
* [ ] tizenmobile simulator
* [ ] tizenwatch device
* [ ] webos simulator
* [ ] webos device
* [ ] macos
* [ ] windows
* [ ] chromecast device

- [ ] ios simulator
- [ ] ios device
- [ ] android simulator
- [ ] android device
- [ ] web browser
- [ ] tvos simulator
- [ ] tvos device
- [ ] androidtv simulator
- [ ] androidtv device
- [ ] androidwear simulator
- [ ] androidwear device
- [ ] tizen simulator
- [ ] tizen device
- [ ] tizenmobile simulator
- [ ] tizenwatch device
- [ ] webos simulator
- [ ] webos device
- [ ] macos
- [ ] windows
- [ ] chromecast device

Existing Project created with previous version of renative:
* [ ] ios simulator
* [ ] ios device
* [ ] android simulator
* [ ] android device
* [ ] web browser
* [ ] tvos simulator
* [ ] tvos device
* [ ] androidtv simulator
* [ ] androidtv device
* [ ] androidwear simulator
* [ ] androidwear device
* [ ] tizen simulator
* [ ] tizen device
* [ ] tizenmobile simulator
* [ ] tizenwatch device
* [ ] webos simulator
* [ ] webos device
* [ ] macos
* [ ] windows
* [ ] chromecast device

- [ ] ios simulator
- [ ] ios device
- [ ] android simulator
- [ ] android device
- [ ] web browser
- [ ] tvos simulator
- [ ] tvos device
- [ ] androidtv simulator
- [ ] androidtv device
- [ ] androidwear simulator
- [ ] androidwear device
- [ ] tizen simulator
- [ ] tizen device
- [ ] tizenmobile simulator
- [ ] tizenwatch device
- [ ] webos simulator
- [ ] webos device
- [ ] macos
- [ ] windows
- [ ] chromecast device
25 changes: 25 additions & 0 deletions .prettierignore
@@ -0,0 +1,25 @@
lib
dist
node_modules
.expo
.next
.vscode

appConfigs
platformBuilds
platformAssets
renative.local.json
renative.private.json
renative.build.json
renative.runtime.json
rnv-config.local.json
metro.config.local.js

coverage
build

.vercel

allure-results
pluginTemplates
*.d.ts
3 changes: 3 additions & 0 deletions .prettierrc.js
@@ -0,0 +1,3 @@
module.exports = {
...require('@flexn/prettier-config'),
};
27 changes: 13 additions & 14 deletions CODE_OF_CONDUCT.md
Expand Up @@ -14,22 +14,22 @@ religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down Expand Up @@ -71,4 +71,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

0 comments on commit 1eaa00b

Please sign in to comment.