Skip to content

Commit

Permalink
chore: Add custom browserslist (#2290)
Browse files Browse the repository at this point in the history
* Add browserslist config.

* Integrate browserslistrc w/ eslint and stylelint.

* Fix config.

* Remove stylelint plugin.

* Fix plugin configuration.

* Corrected label.

* Delete old comment.
  • Loading branch information
cmaddox5 authored Nov 14, 2024
1 parent ba0e81f commit f5abc2e
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 40 deletions.
12 changes: 12 additions & 0 deletions assets/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DUP
ChromeAndroid 61
# Sectional (Solari)
Firefox 90
# Sectional (GDS)
Firefox 126
# Pre-Fare
Chrome 126
# Bus Shelter
Firefox 126
# Bus E-ink (GDS)
Chrome 45
15 changes: 15 additions & 0 deletions assets/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
["@babel/plugin-proposal-optional-chaining", { "loose": false }],
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],
"@babel/plugin-proposal-do-expressions"
]
}
5 changes: 5 additions & 0 deletions assets/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import pluginReactHooks from "eslint-plugin-react-hooks";
import eslintConfigPrettier from "eslint-config-prettier";
import jestPlugin from "eslint-plugin-jest";
import compat from "eslint-plugin-compat";

export default [
{ languageOptions: { globals: globals.browser } },
Expand Down Expand Up @@ -48,4 +49,8 @@ export default [
],
},
},
{
...compat.configs["flat/recommended"],
files: ["**/*.{ts, tsx}"],
},
];
180 changes: 161 additions & 19 deletions assets/package-lock.json

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

2 changes: 2 additions & 0 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@
"@types/react-router-dom": "^5.1.8",
"@types/webpack-env": "^1.18.4",
"babel-loader": "^8.2.2",
"browserslist": "^4.24.2",
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^6.4.1",
"css-loader": "^5.2.7",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-compat": "^6.0.1",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
Expand Down
Loading

0 comments on commit f5abc2e

Please sign in to comment.