Skip to content

Commit

Permalink
Typescript refactor (#304)
Browse files Browse the repository at this point in the history
* Refactored actions and main TypeScript files

* Added type annotation to preloadedState

* Fixed reducer types

* Refactored admin

* Components refactor part I

* Components refactor part 2

* Done component refactoring

* Big refactor final #1

* Final refactoring

* Typescript Refactor final

* Fixed some errors

* Moved react-app extension back to package.json
  • Loading branch information
paulpan05 authored Jul 5, 2020
1 parent 03f3a66 commit 7d923c2
Show file tree
Hide file tree
Showing 112 changed files with 1,574 additions and 1,310 deletions.
22 changes: 12 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module.exports = {
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
extends: [
'airbnb-typescript',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
parserOptions: {
project: './tsconfig.json',
},
env: {
browser: true,
commonjs: true,
Expand All @@ -8,19 +15,14 @@ module.exports = {
node: true,
},
rules: {
'react/prop-types': 'off',
'react/jsx-one-expression-per-line': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-async-promise-executor': ['off'],
'jsx-a11y/click-events-have-key-events': ['off'],
'jsx-a11y/href-no-hash': ['off'],
'jsx-a11y/label-has-associated-control': ['off'],
'jsx-a11y/no-static-element-interactions': ['off'],
'react/jsx-filename-extension': ['warn', { extensions: ['.js', '.jsx'] }],
'react/jsx-filename-extension': ['warn', { extensions: ['.ts', '.tsx'] }],
},
overrides: [
{
files: ['src/containers/**/*.jsx'],
rules: {
'react/prop-types': 0
}
}
]
};
5 changes: 4 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
trailingComma: 'es5',
printWidth: 100,
tabWidth: 2,
};
29 changes: 12 additions & 17 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
module.exports = {
extends: 'stylelint-config-standard',
plugins: [
'stylelint-order'
extends: 'stylelint-config-standard',
plugins: ['stylelint-order'],
rules: {
'order/order': ['custom-properties', 'declarations'],
'order/properties-alphabetical-order': true,
'font-family-no-missing-generic-family-keyword': [
true,
{
ignoreFontFamilies: ['Nunito', 'Roboto'],
},
],
rules: {
'order/order': [
'custom-properties',
'declarations'
],
'order/properties-alphabetical-order': true,
'font-family-no-missing-generic-family-keyword': [
true,
{
"ignoreFontFamilies": ["Nunito", "Roboto"]
}
]
}
}
},
};
2 changes: 1 addition & 1 deletion config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ module.exports = override(
'@text-selection-bg': '#22ACEA',
'@link-color': '#22ACEA',
},
})
}),
);
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
setupFiles: ['<rootDir>/tests/setup/setupTests.js'],
setupFiles: ['<rootDir>/tests/setup/setupTests.ts'],
};
Loading

0 comments on commit 7d923c2

Please sign in to comment.