Comments (2)
I'm +1 on adding some docs about snapshots and how to deal with them! In addition to ESLint output snapshots, we have rule schema snapshots. It would be nice to mention them as well.
Btw, we can also explain how to work with ast-spec
snapshots. This may seem non-trivial!
There is a great explanation from Brad: #7649 (comment) 👍
within this folder create a folder called
fixtures
.within
fixtures
create a_error_
folderwithin
_error_
create a folder with a name for your case - for example maybeusing-initializer
?within that folder, create a file called
fixture.ts
within that file add your test code (eg
for(using foo in {});
)
cd packages/ast-spec && yarn test
to run the fixture tests and generate the necessary snapshots.
from typescript-eslint.
Yeah I cd eslint-plugin; yarn test schemas -u
to update snapshots. +1 to docs
from typescript-eslint.
Related Issues (20)
- Bug: [no-unnecessary-type-assertion] false positive when casting to HTMLElement (from Element) HOT 6
- Bug: object-shorthand loses type parameters when auto-fixing HOT 3
- Enhancement: [strict-boolean-expressions] Check truthiness assertion functions HOT 6
- Repo: rule-tester's eslint-base test failing on main
- Repo: rule-tester tests failing on v8 HOT 1
- Bug: <short description of the issue> HOT 3
- Enhancement(rule-tester): Stricter rule test validations
- Enhancement(rule-tester): FlatRuleTester -> RuleTester
- Enhancement(rule-tester): detect duplicate test cases
- Enhancement(rule-tester): check for parsing errors in suggestion fixes
- Enhancement(rule-tester): check for missing placeholder data in the message
- Docs: Add blog post announcing v8 beta
- Docs: Consider using a URL shortener for links printed by code HOT 3
- Repo: Add a CI check that 'breaking change' PR descriptions start with the right title text
- Repo: Raise TSConfig lib/target support range to match ESLint's
- Enhancement: [return-await] Option for unopinionated "in-try-catch" HOT 5
- Bug: "Too many files (>8) have matched the default project" error triggers on every file after 8 HOT 7
- Docs: `method-signature-style` lint rule ❤ `--enforceReadonly` compiler flag
- Rule proposal: Disallow calling Number.isNaN on non-number types HOT 10
- Configs: Make consistent-type-imports 'error' for the recommended config HOT 24
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 typescript-eslint.