Comments (7)
Let me share the big picture in my mind.
This wakaru.json
should support configuring rule orders and their enabled status. Users should be able to pass some advanced options to rules. (This is not even presented in the playground right now).
The format of eslintrc can be a reference of how this config file should structured.
Parser won't be configurable, it's fixed.
from wakaru.
should support configuring rule orders
then rules would be an array
{
"rules": [
["un-jsx", "off"]
],
}
how to generate or provide the config file
to create a default config file
wakaru unminify --init-config wakaru.json
from wakaru.
For the user interaction part, how to generate or provide the config file is also something that needs some consideration.
from wakaru.
Potentially could be something like this (object in the array, rather than array in array):
{
"rules": [
{ rule: "un-jsx", enabled: false }
],
}
It's been a while since I looked how eslint handles its config for plugins/etc with extra options:
from wakaru.
object in the array
more verbose...
plus, the rule name is required, so why not make it a positional argument
in any case, it would be nice to have javascript configs
wakaru.js wakaru.cjs wakaru.mjs
from wakaru.
Verbosity in a config file doesn't necessarily matter all that much if it makes things more explicit/coherent. But I don't have strong opinions either way.
Eslint seems to use a straight object for the rule config; but then I don't believe it makes use of ordering there. Technically depending how the object is iterated it can have stable ordering, but that might be too 'hidden away'/unobvious for most users.
Perhaps webpack/similar's config patterns are worth modelling on as well.
from wakaru.
If you are running this repo in local environment, simply disable it in file packages/unminify/src/transformations/index.ts
i guess the simplest solution would be only javascript config, no json config
// wakaru.config.js
import { transformationRules } from "wakaru/unminify"
export default {
transformationRules: transformationRules.filter(rule => {
if (rule.name == "un-jsx") return false
return true
}),
}
from wakaru.
Related Issues (20)
- Support `--perf-output` in CLI
- Improve CJS / ESM transformation (`un-esm`
- Next.js webpackJsonp_N_E HOT 1
- @wakaru/ide:build: RollupError: Identifier "a" has already been declared HOT 2
- infinite loop? wakaru unminify runs forever HOT 2
- wakaru removes unused imports HOT 1
- document.createElement is converted to JSX HOT 12
- inline constant tag name in JSX transformation HOT 4
- broken output code: ReferenceError: x is not defined HOT 1
- smart-rename is missing some renames HOT 7
- Explore creating a 'reverse engineered' records.json / stats.json file from a webpack build HOT 1
- un-sequence-expression is incorrect HOT 1
- wrong position for default parameters HOT 1
- Contexts that are too large are not further parsed for objects within the array. HOT 1
- feat: support Webpack SplitChunksPlugin HOT 6
- BrowserFS Deprecated HOT 1
- React 19 and React Compiler support
- Dynamic require of "assert" is not supported Error when importing Wakaru Unpacker HOT 8
- smart-rename pass not renames property inside MemberExpression HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wakaru.