Skip to content

Commit

Permalink
👌 Add & configure TS, babel, webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
vforvasile committed Apr 4, 2023
1 parent 0c92abd commit 531cc0d
Show file tree
Hide file tree
Showing 8 changed files with 522 additions and 65 deletions.
63 changes: 33 additions & 30 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
module.exports = {
env: {
browser: true,
es2021: true,
'jest/globals': true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"extends": [
"react-app",
"react-app/jest",
"airbnb",
"airbnb-typescript",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'react',
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
'jest',
],
rules: {
'react/prop-types': 'off',
'react/jsx-filename-extension': 'off',
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
"@typescript-eslint",
"prettier"

],
"rules": {
"react/react-in-jsx-scope": ["off"],
"react/jsx-uses-react": ["off"],
"react/jsx-props-no-spreading": ["warn"],
"react/no-unescaped-entities": ["off"]
}
};
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"useTabs": false,
"endOfLine":"auto"
}
16 changes: 5 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": true
}
}
],
"@babel/preset-react"
]
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
]
};
Loading

0 comments on commit 531cc0d

Please sign in to comment.