Skip to content

Commit e5fd208

Browse files
committed
chore: add copilot instructions
1 parent 2b08239 commit e5fd208

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
This is a CSS selector parser which tries to follow latest CSS standards and also support experimental features.
2+
3+
Project structure:
4+
- `src/` contains all the source code.
5+
- `src/ast.ts` Abstract Syntax Tree.
6+
- `src/index.ts` should contain all the public API and types used in public API.
7+
- `src/indexes.ts` indexes for faster lookup.
8+
- `src/parser.ts` contains the parser itself which produces AST from CSS selector string.
9+
- `src/pseudo-signatures.ts` contains types and helper function for pseudo-classes and pseudo-elements.
10+
- `src/renderer.ts` contains the renderer which converts AST back to CSS selector string.
11+
- `src/syntax-definitions.ts` contains types and implementations of syntax definitions for different CSS versions.
12+
- `src/utils.ts` helper functions.
13+
14+
We always write TypeScript with single quotes and 4 spaces for indentation,
15+
so when your responses include TypeScript code, please follow those conventions.
16+
17+
All the imports include ".js" file extension because of the new ES module resolution algorithm.
18+
19+
We write code for better performance, but not at the cost of readability.
20+
21+
We write self-explanatory variable names and comments in English.

0 commit comments

Comments
 (0)