Skip to content

Commit

Permalink
Remove frontend config
Browse files Browse the repository at this point in the history
We don't use React or TypeScript.

Webpack is not necessary to bundle the one JS file in this app, as even
Wagtail's Webpack config only copies the file to the build directory.

Linting configuration is kept as we can still run it via pre-commit. CSS
linting is also kept, as even though we don't have any CSS files right
now, it might be handy in case we need CSS overrides to maintain
compatibility with latest Wagtail versions.
  • Loading branch information
laymonage committed Jul 17, 2023
1 parent 7bfca3f commit b92aa77
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 8,478 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ max_line_length = 88
[*.{html,rst,md}]
indent_size = 4

[*.{js,ts,tsx,json,yml,yaml,css,scss}]
[*.{js,json,yml,yaml,css,scss}]
indent_size = 2

[*.md]
Expand Down
9 changes: 2 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: '@wagtail/eslint-config-wagtail',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'func-names': 'off',
'no-param-reassign': 'off',
'prefer-arrow-callback': 'off',
Expand All @@ -18,7 +13,7 @@ module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
extensions: ['.js', '.jsx'],
},
},
},
Expand All @@ -29,7 +24,7 @@ module.exports = {
{
files: [
'docs/_static/**',
'wagtail_modeladmin/static_src/wagtailmodeladmin/js/prepopulate.js',
'wagtail_modeladmin/static_src/wagtail_modeladmin/js/prepopulate.js',
],
globals: { $: 'readonly', jQuery: 'readonly' },
},
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ repos:
rev: 'v2.7.1'
hooks:
- id: prettier
types_or: [css, scss, javascript, ts, tsx, json, yaml]
types_or: [css, scss, javascript, json, yaml]
- repo: https://github.com/pre-commit/mirrors-eslint
# eslint config is in .eslintrc.js
rev: v8.40.0
hooks:
- id: eslint
additional_dependencies:
- '[email protected]'
# These are required by @wagtail/eslint-config-wagtail
# even if we don't use react
- '[email protected]'
- '[email protected]'
- '[email protected]'
- '[email protected]'
- '[email protected]'
- '@typescript-eslint/[email protected]'
- '@typescript-eslint/[email protected]'
- '@wagtail/[email protected]'
files: \.(js|jsx|ts|tsx)$
files: \.(js)$
types: [file]
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
# stylelint config is in .stylelintrc.js
Expand Down
Loading

0 comments on commit b92aa77

Please sign in to comment.