Skip to content

Commit

Permalink
added eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
jenithainbaraj committed Jan 6, 2023
1 parent f1dcc51 commit cbef4dd
Show file tree
Hide file tree
Showing 15 changed files with 1,076 additions and 684 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ reports/
#Local stuff
*.json
.env*
.rollup.cache
!.env.default
!package.json
!package-lock.json
Expand All @@ -51,5 +52,6 @@ reports/
!base.json
!library.json
!react-library.json
!tsconfig.eslint.json
!.yarn/plugins
node_modules/
Binary file modified .yarn/install-state.gz
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
},
"devDependencies": {
"@changesets/cli": "2.22.0",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@microsoft/api-documenter": "^7.17.19",
"@microsoft/api-extractor": "^7.25.2",
"eslint": "8.22.0",
"eslint-config-webex-int": "*",
"husky": "^8.0.1",
"identity-obj-proxy": "^3.0.0",
"plop": "^3.1.1",
Expand Down
68 changes: 68 additions & 0 deletions src/eslint-config-webex-int/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
module.exports = {
extends: [
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'airbnb-typescript-prettier',
'plugin:react-hooks/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:jsdoc/recommended',
'plugin:jsx-a11y/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['@typescript-eslint', 'jest', 'jsdoc'],
rules: {
'react/jsx-key': 'off',
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off',
'jest/no-done-callback': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function' },
],
'react/require-default-props': [
2,
{
functions: 'defaultArguments',
},
],
},
overrides: [
{
files: ['**/*.test.ts', '**/*.test.tsx'],
rules: {
'jest/no-done-callback': 'off',
'react/jsx-filename-extension': 'off',
},
},
{
files: ['**/*.stories.tsx', '**/*.test.tsx'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'react/function-component-definition': 'off',
},
},
{
files: ['**/__mocks__/**'],
rules: {
'jsdoc/require-jsdoc': 'off',
},
},
],
ignorePatterns: [
'.eslintrc.js',
'webpack.*.js',
'babel.config.js',
'jest.config.js',
'rollup.*.js',
],
};
25 changes: 25 additions & 0 deletions src/eslint-config-webex-int/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "eslint-config-webex-int",
"version": "0.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"eslint": "8.22.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-airbnb-typescript-prettier": "^5.0.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.8.7",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "2.5.1",
"typescript": ">=3.0.0"
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 9 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "ts-config-webex-int/base.json",
"include": [
".eslintrc.js",
".eslintrc.json"
// "apps/**/*.ts",
// "packages/**/*.ts",
]
}
Loading

0 comments on commit cbef4dd

Please sign in to comment.