This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/.babelrc

33 lines
770 B
Plaintext
Raw Permalink Normal View History

{
"presets": ["@babel/env", "@babel/typescript"],
"plugins": [
web/admin: simplify sidebar renderer (#6797) * Added a 'Hard-Core' lint mode to pre-commit; this will not automagically fix all your problems, but it will show you where some deeper issues arise. * web: streamline sidebar renderer The sidebar renderer had a lot of repetitive code that could easily be templatized, so I extracted the content from it and turned it into a table. * web: complexity of the Sidebar now below 10. This commit incorporates SonarJS into the pre-commit (and *only* the pre-commit) linting pass; SonarJS is much more comprehensive in its complaints, and it's helpful in breaking long functions down to their simplest forms. In this case, the `renderSidebarItems()` function was considered "unreadable," and I've managed to boil it down to its three special cases (new version, impersonation, and enterprise notification) and its routine case (the rest of the sidebar). Going forward, I'd like all our commits to correspond to the SonarJS settings I've established in .eslint.precommit.json, but I'm not gonna hate on others if they don't quite hit it. :-) * web: modernization continues. Three of our four Babel plug-ins have moved from 'proposed' to 'accepted'; I have updated package.json and the .babelrc file to accept those. Node's ability to set its max_old_space_size via the environment variable was enable in 2019; using it here makes it easier to move this code toward a multi-package monorepo in the future. * Adding 'cross-env' so that the uses of the NODE_OPTIONS environment will work (theoretically) on Windows.
2023-09-11 19:58:55 +00:00
["@babel/plugin-transform-private-methods", { "loose": true }],
["babel-plugin-tsconfig-paths", {}],
[
"@babel/plugin-proposal-decorators",
{
"decoratorsBeforeExport": true
}
],
[
web/admin: simplify sidebar renderer (#6797) * Added a 'Hard-Core' lint mode to pre-commit; this will not automagically fix all your problems, but it will show you where some deeper issues arise. * web: streamline sidebar renderer The sidebar renderer had a lot of repetitive code that could easily be templatized, so I extracted the content from it and turned it into a table. * web: complexity of the Sidebar now below 10. This commit incorporates SonarJS into the pre-commit (and *only* the pre-commit) linting pass; SonarJS is much more comprehensive in its complaints, and it's helpful in breaking long functions down to their simplest forms. In this case, the `renderSidebarItems()` function was considered "unreadable," and I've managed to boil it down to its three special cases (new version, impersonation, and enterprise notification) and its routine case (the rest of the sidebar). Going forward, I'd like all our commits to correspond to the SonarJS settings I've established in .eslint.precommit.json, but I'm not gonna hate on others if they don't quite hit it. :-) * web: modernization continues. Three of our four Babel plug-ins have moved from 'proposed' to 'accepted'; I have updated package.json and the .babelrc file to accept those. Node's ability to set its max_old_space_size via the environment variable was enable in 2019; using it here makes it easier to move this code toward a multi-package monorepo in the future. * Adding 'cross-env' so that the uses of the NODE_OPTIONS environment will work (theoretically) on Windows.
2023-09-11 19:58:55 +00:00
"@babel/plugin-transform-class-properties",
{
"loose": true
}
],
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
],
"macros",
[
web/admin: simplify sidebar renderer (#6797) * Added a 'Hard-Core' lint mode to pre-commit; this will not automagically fix all your problems, but it will show you where some deeper issues arise. * web: streamline sidebar renderer The sidebar renderer had a lot of repetitive code that could easily be templatized, so I extracted the content from it and turned it into a table. * web: complexity of the Sidebar now below 10. This commit incorporates SonarJS into the pre-commit (and *only* the pre-commit) linting pass; SonarJS is much more comprehensive in its complaints, and it's helpful in breaking long functions down to their simplest forms. In this case, the `renderSidebarItems()` function was considered "unreadable," and I've managed to boil it down to its three special cases (new version, impersonation, and enterprise notification) and its routine case (the rest of the sidebar). Going forward, I'd like all our commits to correspond to the SonarJS settings I've established in .eslint.precommit.json, but I'm not gonna hate on others if they don't quite hit it. :-) * web: modernization continues. Three of our four Babel plug-ins have moved from 'proposed' to 'accepted'; I have updated package.json and the .babelrc file to accept those. Node's ability to set its max_old_space_size via the environment variable was enable in 2019; using it here makes it easier to move this code toward a multi-package monorepo in the future. * Adding 'cross-env' so that the uses of the NODE_OPTIONS environment will work (theoretically) on Windows.
2023-09-11 19:58:55 +00:00
"@babel/plugin-transform-private-property-in-object",
{
"loose": true
}
]
]
}