8 Commits

Author SHA1 Message Date
Isaac Mann
839dc1585b
feat(devkit): prefer strings over Linter enum (#27209)
We should be consistent about how options are defined in our plugins.
Currently, there are some options that use `enum`s and some that use
typed strings. I think typed strings are preferable because someone
extending a generator only needs to import the main generator that
they're extending, not all the transitive dependencies of that
generator.

Current extending code:
```
// ...
import { applicationGenerator as reactApplicationGenerator } from '@nx/react';
import { Linter } from '@nx/eslint';

export async function applicationGenerator(
  tree: Tree,
  options: ApplicationGeneratorSchema
) {
  reactApplicationGenerator(tree, {
    ...options,
    linter: Linter.EsLint,
  });
}
```

Desired extending code:
```
// ...
import { applicationGenerator as reactApplicationGenerator } from '@nx/react';

export async function applicationGenerator(
  tree: Tree,
  options: ApplicationGeneratorSchema
) {
  reactApplicationGenerator(tree, {
    ...options,
    linter: 'eslint',
  });
}
```

The problem is not just an extra line of code, the person extending the
`reactApplicationGenerator` has to dig into the implementation details
of the generator itself in order to know where to find the `Linter`
enum. The `e2eTestRunner` is already a typed string and is easily
extended.

The solution I'm proposing in this PR would define a typed string in the
same file as the existing enum. None of the implementations need to
change. No community plugin code will be broken.
2024-08-19 17:07:28 -04:00
Jason Jean
396ffc4636
feat(core): enable project crystal by default (#21403)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-02-02 03:40:59 -05:00
Emily Xiong
65e86eacac
feat(react-native): upgrade react native to 0.73 (#20896) 2024-01-31 15:38:02 -05:00
Miroslav Jonaš
0bc693342e
feat(linter): rename @nx/linter to @nx/eslint (#19515) 2023-10-16 11:52:19 -04:00
Jason Jean
2d195007b0
feat(core): switch packages to use the @nx scope (#16069) 2023-04-14 19:56:37 -04:00
Katerina Skroumpelou
8bc99407aa
feat(storybook): ignore paths when generating stories (#11111)
* feat(storybook): ignore paths when generating stories

ISSUES CLOSED: #10211

* cleanup(storybook): add test for nested component ignore path

* feat(storybook): ensure ignore paths parsed correctly

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2022-08-08 14:17:06 +01:00
Katerina Skroumpelou
1de896f3e8
feat(storybook): choose to generate ts config (#10572)
ISSUES CLOSED: #10394
2022-06-03 15:31:18 +00:00
Emily Xiong
19efdfc938
feat(react-native): add storybook to react native (#8886) 2022-02-14 10:13:23 -05:00