Skip to content

Commit

Permalink
Sort common json files (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt authored Jul 16, 2024
2 parents a7c6d71 + 6e53cbb commit 5e175aa
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 34 deletions.
53 changes: 22 additions & 31 deletions src/client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-refresh", "prettier"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
settings: { react: { version: "detect" } },
rules: {
"prettier/prettier": [
"error",
{
bracketSameLine: true,
trailingComma: "all",
arrowParens: "avoid",
printWidth: 120,
endOfLine: "auto",
},
root: true,
env: {browser: true, es2020: true},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/display-name": "off",
},
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-refresh", "prettier"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parserOptions: {ecmaVersion: "latest", sourceType: "module"},
settings: {react: {version: "detect"}},
rules: {
"prettier/prettier": "error",
"react-refresh/only-export-components": ["warn", {allowConstantExport: true}],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/display-name": "off",
},
};
2 changes: 2 additions & 0 deletions src/client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.json
!common.json
3 changes: 2 additions & 1 deletion src/client/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"trailingComma": "all",
"arrowParens": "avoid",
"printWidth": 120,
"endOfLine": "auto"
"endOfLine": "auto",
"plugins": ["prettier-plugin-sort-json"]
}
13 changes: 13 additions & 0 deletions src/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"eslint-plugin-react-refresh": "^0.4.5",
"license-checker": "^25.0.1",
"prettier": "^3.1.0",
"prettier-plugin-sort-json": "^4.0.0",
"typescript": "^5.3.3",
"vite": "^5.2.8",
"vite-plugin-svgr": "^4.2.0",
Expand All @@ -94,7 +95,7 @@
"build": "tsc && vite build",
"preview": "vite preview",
"test": "cypress run",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.json --report-unused-disable-directives --max-warnings 0",
"cy": "cypress open"
}
}
1 change: 0 additions & 1 deletion src/client/public/locale/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
"editingEnabled": "Editing started",
"editingStart": "Start editing",
"editingStop": "Stop editing",
"endEditing":"Stop editing",
"elevation_precision": "+/- Ground elevation [m]",
"elevation_z": "Ground elevation [m a.s.l.]",
"elevation_z_from": "Ground Elevation (from)",
Expand Down

0 comments on commit 5e175aa

Please sign in to comment.