Skip to content

Commit ddcfdfc

Browse files
added vscode ext
1 parent 7be4b6b commit ddcfdfc

14 files changed

+3645
-5
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.vscode
22
target
33
Cargo.lock
4-
npm-package/src/bin
5-
vscode-ext
4+
npm-package/src/bin

Readme.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
# Next.Js CSS modules using linter
1+
# 🎨 Next.js CSS Linter
22

3-
## Description
4-
Coming soon
3+
A tool for analyzing CSS modules in Next.js projects. The linter detects **unused classes** in styles and **references to non-existent classes** in `.tsx` files.
4+
5+
## 🔹 Features
6+
- Project-wide analysis with warnings displayed in the editor
7+
- High performance thanks to Rust-based implementation
8+
- Support for `import aliases` from `tsconfig.json`
9+
- Ability to ignore specific warnings
10+
11+
## 🔹 Usage
12+
Linting runs automatically **on file save**, and warnings are displayed in the workspace.
13+
14+
### 🔹 Ignoring Warnings
15+
If a class is used correctly but still marked as unused, add a comment **directly above the class declaration**:
16+
```css
17+
/* css-lint-disable-rule unused-class */
18+
```
19+
Alternatively, use the **Quick Fix** feature available in the editor.
20+
21+
---
22+
**by AndcoolSystems, 04 March, 2025**

vscode-ext/.eslintrc.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": [
13+
"warn",
14+
{
15+
"selector": "import",
16+
"format": [ "camelCase", "PascalCase" ]
17+
}
18+
],
19+
"@typescript-eslint/semi": "warn",
20+
"curly": "warn",
21+
"eqeqeq": "warn",
22+
"no-throw-literal": "warn",
23+
"semi": "off"
24+
},
25+
"ignorePatterns": [
26+
"out",
27+
"dist",
28+
"**/*.d.ts"
29+
]
30+
}

vscode-ext/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix

vscode-ext/.vscode-test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});

vscode-ext/.vscodeignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.vscode/**
2+
.vscode-test/**
3+
src/**
4+
.gitignore
5+
.yarnrc
6+
vsc-extension-quickstart.md
7+
**/tsconfig.json
8+
**/.eslintrc.json
9+
**/*.map
10+
**/*.ts
11+
**/.vscode-test.*
12+
*.vsix

vscode-ext/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 AndcoolSystems
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

vscode-ext/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 🎨 Next.js CSS Linter
2+
3+
A tool for analyzing CSS modules in Next.js projects. The linter detects **unused classes** in styles and **references to non-existent classes** in `.tsx` files.
4+
5+
## 🔹 Features
6+
- Project-wide analysis with warnings displayed in the editor
7+
- High performance thanks to Rust-based implementation
8+
- Support for `import aliases` from `tsconfig.json`
9+
- Ability to ignore specific warnings
10+
11+
## 🔹 Usage
12+
Linting runs automatically **on file save**, and warnings are displayed in the workspace.
13+
14+
### 🔹 Ignoring Warnings
15+
If a class is used correctly but still marked as unused, add a comment **directly above the class declaration**:
16+
```css
17+
/* css-lint-disable-rule unused-class */
18+
```
19+
Alternatively, use the **Quick Fix** feature available in the editor.
20+
21+
---
22+
**by AndcoolSystems, 04 March, 2025**

vscode-ext/icon.png

2.78 KB
Loading

0 commit comments

Comments
 (0)