Comments (4)
__tests__
is a common pattern used by big projects like react. It avoid to get a huge test
folder with duplicated tree structure and ensure modularity of the components. Like having multiples .md files near the corresponding code.
For the index.js we might be able to get rid of it using some others tricks that this kind of exports.
I will think about it.
from stylelint.
duplicated tree structure and ensure modularity of the components
omg. now tree structure is duplicated and confusing, lol
its enough to have just one test/
folder and in her to have fixtures/
or something..
from stylelint.
src/rules/*.js
test/rules/*.js
docs/rules/*.js
vs
src/rules/*/*.js
src/rules/*/*.md
src/rules/*/__tests__/*.js
To write decoupled code it make more sense to me.
omg. now tree structure is duplicated and confusing, lol
I work with a lot of people in different teams that like this way that encourage modularity.
Sometimes __tests__
is test
but it doesn't change the way files are arranged.
The most I work with fixtures, the more I like to write tiny decoupled components that have fixtures embed in the tests. Like here stylelint already does and eslint does too.
An good example of painful fixtures to maintain is my cssnext project (btw I will change that soon).
es6 template string (multilines string) might help too to have embed fixtures.
from stylelint.
I also think that having tests right there next to the thing they're testing makes sense for this project, which will end up having so many relatively independent little parts.
from stylelint.
Related Issues (20)
- If you manually specify the configPath path in VScode's stylelint extension, the.stylelintignore file will no longer be recognized, not even the array in the ignoreFiles property of the configuration object
- `declaration-block-no-redundant-longhand-properties` is not forwards compatible HOT 13
- `declaration-block-no-redundant-longhand-properties` needs to be value type aware HOT 8
- Add new rule to disallow specific condition in `@container` queries HOT 1
- Create option to extend rule: font-family-no-duplicate-names HOT 1
- Create option to extend rule: no-duplicate-at-import-rules HOT 1
- Create option to extend rule: no-unknown-animations HOT 1
- CLI doesn't seem to work as expected. HOT 2
- [16.4.0] Cannot suppress `selector-max-universal` HOT 4
- Add regex support to `value-no-vendor-prefix` secondary option
- Provide links to message HOT 3
- Fix `shorthand-property-no-redundant-values` false negatives for `var()` HOT 10
- Add flags/options to set custom exit codes depending on the severity HOT 10
- TypeScript reports "Type 'CosmiconfigResult' is not generic" HOT 1
- Release 16.5.0 HOT 5
- Create option to extend rule: font-family-no-duplicate-names HOT 1
- Create option to extend rule: no-duplicate-at-import-rules
- Create option to extend rule: no-unknown-animations
- Stylelint --fix does not fix two problems at the same time: the order/properties-order property, and the removal of extra empty lines. HOT 4
- no-missing-end-of-source-newline false positive after upgrade to v16.4.0 (from 15.11.0) 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 stylelint.