diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..668932c --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,58 @@ +module.exports = { + extends: ['react-app', 'prettier'], + plugins: ['@emotion'], + env: { + browser: true, + es6: true, + }, + parserOptions: { + ecmaVersion: 8, + }, + rules: { + '@emotion/pkg-renaming': 'error', + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ + '**/*.test.js', + '**/*.spec.js', + '**/stories/**/*.js', + '**/*.stories.js', + '**/setupProxy.js', + ], + }, + ], + 'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], + 'react/jsx-one-expression-per-line': 0, + 'react/no-did-update-set-state': 0, + 'react/sort-comp': [ + 2, + { + order: [ + 'static-methods', + 'instance-variables', + 'lifecycle', + 'everything-else', + 'render', + ], + }, + ], + 'jsx-a11y/href-no-hash': 'off', + 'no-param-reassign': ['error', { props: false }], + 'no-underscore-dangle': ['error', { allow: ['_token'] }], + camelcase: [2, { ignoreDestructuring: true }], + 'no-console': ['warn', { allow: ['warn', 'error'] }], + 'import/no-named-as-default': 'off', + 'import/no-cycle': 'warn', + }, + settings: { + 'import/resolver': { + node: { + moduleDirectory: [ + 'node_modules', + 'src', // replace with your app-module-path directory + ], + }, + }, + }, +} diff --git a/package.json b/package.json index c5b7a1d..db7d9d8 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,17 @@ { "name": "seedshuffler", - "version": "0.1.0", - "private": true, + "version": "1.0.0", + "private": false, "dependencies": { + "@emotion/styled": "^11.10.5", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", + "@testing-library/user-event": "^14.4.3", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-scripts": "5.0.1", - "web-vitals": "^2.1.4" + "react-intl": "^6.2.1", + "react-scripts": "^5.0.1", + "web-vitals": "^3.1.0" }, "scripts": { "start": "react-scripts start", @@ -34,5 +36,14 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "eslint": "^8.28.0", + "eslint-config-prettier": "^8.5.0", + "eslint-config-react-app": "^7.0.1", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsx-a11y": "^6.6.1", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.31.11" } } diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..edc047c --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,5 @@ +module.exports = { + semi: false, + trailingComma: 'all', + singleQuote: true, +}