Skip to content

Commit 5d8983b

Browse files
authored
Merge pull request #304 from oslabs-beta/main
Merge OpenAPI and WebRTC features from beta
2 parents 4f79671 + 29e07b0 commit 5d8983b

File tree

299 files changed

+22843
-41867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+22843
-41867
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist
2+
/build
3+
/node_modules

.eslintrc.js

Lines changed: 189 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,189 @@
1-
// module.exports = {
2-
// "extends" : "airbnb",
3-
// "parser" : "babel-eslint",
4-
// "plugins" : [
5-
// "react",
6-
// "jsx-a11y",
7-
// "import"
8-
// ],
9-
// "rules": {
10-
// "react/jsx-filename-extension": 0,
11-
// "no-use-before-define": 0,
12-
// "no-console": 0,
13-
// "func-names": 0,
14-
// "no-undef": 0,
15-
// "no-unused-vars": 0,
16-
// "strict": 0,
17-
// "dot-notation": 0,
18-
// "import/extensions": 0,
19-
// "no-useless-constructor": 0,
20-
// "react/prefer-stateless-function": 0,
21-
// "react/prop-types": 0,
22-
// "react/destructuring-assignment": 0,
23-
// "react/no-array-index-key": 0,
24-
// "react/no-did-update-set-state": 0,
25-
// "no-restricted-syntax": 0,
26-
// "react/forbid-prop-types": 0,
27-
// "react/no-access-state-in-setstate": 0,
28-
// "react/jsx-no-duplicate-props": 0,
29-
// "no-param-reassign": 0,
30-
// "no-unused-expressions": 0,
31-
// "import/no-unresolved": 0,
32-
// "react/no-unused-state": 0,
33-
// "no-shadow": 0,
34-
// "no-return-assign": 0,
35-
// "class-methods-use-this": 0,
36-
// "brace-style": [2, "stroustrup"],
37-
// "react/sort-comp": [2, {
38-
// order: [
39-
// "lifecycle",
40-
// "everything-else",
41-
// "rendering",
42-
// ]
43-
// }]
44-
// }
45-
// };
46-
47-
module.exports = {
48-
env: {
49-
es6: true,
50-
jest: true,
51-
node: true,
52-
},
53-
extends: [
54-
"airbnb",
55-
"prettier",
56-
"prettier/@typescript-eslint",
57-
"prettier/react",
58-
// "plugin:@typescript-eslint/eslint-recommended",
59-
// "plugin:@typescript-eslint/recommended",
60-
],
61-
globals: {
62-
Atomics: "readonly",
63-
SharedArrayBuffer: "readonly",
64-
},
65-
parser: "babel-eslint",
66-
// parser: "@typescript-eslint/parser",
67-
parserOptions: {
68-
ecmaVersion: 2020,
69-
ecmaFeatures: {
70-
jsx: true,
71-
classes: true,
72-
},
73-
},
74-
plugins: [
75-
// "@typescript-eslint",
76-
"react",
77-
"jsx-a11y",
78-
"import",
79-
"jest",
80-
"react-hooks",
81-
],
82-
rules: {
83-
"arrow-body-style": 0,
84-
camelcase: 0,
85-
"class-methods-use-this": 0,
86-
"consistent-return": 0,
87-
"comma-dangle": 0,
88-
"dot-notation": 0,
89-
"func-names": 0,
90-
"guard-for-in": 0,
91-
"import/extensions": 0,
92-
"import/no-extraneous-dependencies": 0,
93-
"import/no-unresolved": 0,
94-
"import/prefer-default-export": 0,
95-
"max-len": 0,
96-
"no-alert": 0,
97-
"no-console": 0,
98-
"no-param-reassign": 0,
99-
"no-plusplus": 0,
100-
"no-restricted-globals": 1,
101-
"no-restricted-syntax": 0,
102-
"no-shadow": 0,
103-
"no-undef": 0,
104-
"no-unused-vars": 0,
105-
"no-use-before-define": 0,
106-
"no-useless-constructor": 0,
107-
"no-underscore-dangle": 0,
108-
"no-unused-expressions": 0,
109-
"no-return-assign": 0,
110-
quotes: 0,
111-
"prefer-const": 1,
112-
"prefer-destructuring": 0,
113-
"prefer-template": 0,
114-
"react/button-has-type": 0,
115-
"react/destructuring-assignment": 0,
116-
"react/forbid-prop-types": 0,
117-
"react/jsx-filename-extension": 0,
118-
"react/jsx-no-duplicate-props": 0,
119-
"react/no-access-state-in-setstate": 0,
120-
"react/no-array-index-key": 0,
121-
"react/no-did-update-set-state": 0,
122-
"react/no-unused-state": 0,
123-
"react/prefer-stateless-function": 0,
124-
"react/sort-comp": [
125-
2,
126-
{
127-
order: ["lifecycle", "everything-else", "rendering"],
128-
},
129-
],
130-
"react/prop-types": 0,
131-
"spaced-comment": 0,
132-
strict: 0,
133-
},
134-
// setting: {
135-
// "import/parsers": {
136-
// "@typescript-eslint/parser": [".ts", ".tsx"],
137-
// },
138-
// "import/resolver": {
139-
// typescript: {
140-
// alwaysTryTypes: true,
141-
// },
142-
// },
143-
// },
144-
};
1+
module.exports = {
2+
// Global ESLint Settings
3+
// =================================
4+
root: true,
5+
env: {
6+
browser: true,
7+
es6: true,
8+
node: true,
9+
jest: true,
10+
},
11+
globals: {
12+
Atomics: 'readonly',
13+
SharedArrayBuffer: 'readonly',
14+
},
15+
ignorePatterns: ['cypress/*'],
16+
settings: {
17+
react: {
18+
version: 'detect',
19+
},
20+
'import/resolver': {
21+
typescript: {},
22+
'babel-module': {
23+
root: ['.'],
24+
alias: {
25+
'~/static': './public/static/',
26+
'~': './',
27+
},
28+
},
29+
},
30+
},
31+
32+
// ===========================================
33+
// Set up ESLint for .js / .jsx files
34+
// ===========================================
35+
// .js / .jsx uses babel-eslint
36+
parser: 'babel-eslint',
37+
parserOptions: {
38+
ecmaVersion: 2020,
39+
sourceType: 'module',
40+
ecmaFeatures: {
41+
jsx: true,
42+
},
43+
},
44+
45+
// Plugins
46+
// =================================
47+
plugins: ['react', 'jsx-a11y', 'import', 'jest', 'react-hooks', 'prettier'],
48+
49+
// Extend Other Configs
50+
// =================================
51+
extends: [
52+
'airbnb',
53+
'eslint:recommended',
54+
'plugin:import/errors',
55+
'plugin:import/warnings',
56+
'plugin:react/recommended',
57+
// Disable rules that conflict with Prettier
58+
// Prettier must be last to override other configs
59+
'prettier',
60+
],
61+
rules: {
62+
'react/function-component-definition': 0,
63+
'react/boolean-prop-naming': 0,
64+
'react/prop-types': 0,
65+
'react-hooks/exhaustive-deps': 1,
66+
'react/react-in-jsx-scope': 0,
67+
'react/display-name': [0],
68+
// from old
69+
'arrow-body-style': 0,
70+
'class-methods-use-this': 0,
71+
'consistent-return': 0,
72+
'comma-dangle': 0,
73+
'dot-notation': 0,
74+
'func-names': 0,
75+
'guard-for-in': 0,
76+
'import/extensions': 0,
77+
'import/no-extraneous-dependencies': 0,
78+
'import/no-unresolved': 0,
79+
'import/prefer-default-export': 0,
80+
'max-len': 0,
81+
'no-alert': 0,
82+
'no-console': 0,
83+
'no-param-reassign': 0,
84+
'no-plusplus': 0,
85+
'no-restricted-globals': 1,
86+
'no-restricted-syntax': 0,
87+
'no-shadow': 0,
88+
'no-undef': 0,
89+
'no-unused-vars': 0,
90+
'no-use-before-define': 0,
91+
'no-useless-constructor': 0,
92+
'no-underscore-dangle': 0,
93+
'no-unused-expressions': 0,
94+
'no-return-assign': 0,
95+
'prefer-const': 1,
96+
'prefer-destructuring': 0,
97+
'prefer-template': 0,
98+
'react/button-has-type': 0,
99+
'react/destructuring-assignment': 0,
100+
'react/forbid-prop-types': 0,
101+
'react/jsx-filename-extension': 0,
102+
'react/jsx-no-duplicate-props': 0,
103+
'react/no-access-state-in-setstate': 0,
104+
'react/no-array-index-key': 0,
105+
'react/no-did-update-set-state': 0,
106+
'react/no-unused-state': 0,
107+
'react/prefer-stateless-function': 0,
108+
'react/sort-comp': [
109+
2,
110+
{
111+
order: ['lifecycle', 'everything-else', 'rendering'],
112+
},
113+
],
114+
'spaced-comment': 0,
115+
strict: 0,
116+
},
117+
118+
// =================================
119+
// Overrides for Specific Files
120+
// =================================
121+
overrides: [
122+
// Match TypeScript Files
123+
// =================================
124+
{
125+
files: ['**/*.{ts,tsx}'],
126+
127+
// Global ESLint Settings
128+
// =================================
129+
env: {
130+
jest: true,
131+
},
132+
globals: {
133+
React: 'writable',
134+
},
135+
settings: {
136+
'import/parsers': {
137+
'@typescript-eslint/parser': ['.ts', '.tsx'],
138+
},
139+
'import/resolver': {
140+
typescript: {
141+
project: './tsconfig.json',
142+
},
143+
},
144+
},
145+
146+
// Parser Settings
147+
// =================================
148+
// allow ESLint to understand TypeScript syntax
149+
// https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js#L10
150+
parser: '@typescript-eslint/parser',
151+
parserOptions: {
152+
// Lint with Type Information
153+
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
154+
tsconfigRootDir: __dirname,
155+
project: './tsconfig.json',
156+
},
157+
158+
// Plugins
159+
// =================================
160+
plugins: ['jsx-a11y'],
161+
162+
// Extend Other Configs
163+
// =================================
164+
extends: [
165+
'eslint:recommended',
166+
'plugin:@typescript-eslint/eslint-recommended',
167+
'plugin:@typescript-eslint/recommended',
168+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
169+
'plugin:react/recommended',
170+
'plugin:import/errors',
171+
'plugin:import/warnings',
172+
'plugin:import/typescript',
173+
'prettier',
174+
],
175+
rules: {
176+
'react/react-in-jsx-scope': 'off',
177+
'react/prop-types': [0],
178+
// temp allowing during TS migration
179+
'@typescript-eslint/ban-ts-comment': [
180+
'error',
181+
{
182+
'ts-ignore': 'allow-with-description',
183+
minimumDescriptionLength: 4,
184+
},
185+
],
186+
},
187+
},
188+
],
189+
};

0 commit comments

Comments
 (0)