Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
dd18653
chore: move to biome
acdvs May 2, 2026
1eb403f
chore: move to pnpm
acdvs May 2, 2026
a091ac8
chore: add typescript deps, scripts, configs
acdvs May 2, 2026
46c7f07
refactor: move doc generate script to ts
acdvs May 2, 2026
a23b943
docs: update module vars
acdvs May 2, 2026
6b454ae
refactor: move tests to typescript
acdvs May 2, 2026
94e2762
chore: move testing to ts-mocha
acdvs May 2, 2026
7fe6daa
refactor: move rules to typescript
acdvs May 2, 2026
c8dc474
refactor: move utils to typescript
acdvs May 26, 2026
721bc21
refactor: move index to typescript
acdvs May 26, 2026
205374e
feat!: remove no-amd-name
acdvs May 26, 2026
89fad26
feat!: remove no-extra-modules
acdvs May 26, 2026
9e83435
feat!: remove no-module-extensions
acdvs May 26, 2026
f2e39f1
feat: remove agents.md
acdvs May 30, 2026
04f1462
test: move to native node tests, improve test code
acdvs May 31, 2026
6c23479
docs: simplify generate script
acdvs May 31, 2026
1551b9f
chore: package with tsdown
acdvs May 31, 2026
088509f
refactor: fully type rules, use eslint-plugin-amd
acdvs May 31, 2026
ab57303
docs: use dynamic rule url
acdvs May 31, 2026
5aa41df
refactor: use amd utils in module-vars
acdvs May 31, 2026
3843452
chore: bump deps
acdvs Jul 16, 2026
34d7437
fix: biome errors
acdvs Jul 16, 2026
80465f5
test: improve rule tests
acdvs Jul 16, 2026
1bd539a
chore: add lint fix script
acdvs Jul 16, 2026
dbe3899
feat: add default options to meta
acdvs Jul 16, 2026
ee71121
refactor: improve module util naming
acdvs Jul 16, 2026
7b81dbd
refactor: move rule imports to barrel file
acdvs Jul 16, 2026
022b7d3
test: add e2e
acdvs Jul 16, 2026
9dea965
docs: add v3 upgrade guide
acdvs Jul 16, 2026
2143f16
ci: add e2e test
acdvs Jul 16, 2026
cbffb89
ci: upgrade actions
acdvs Jul 16, 2026
1b140d9
docs: separate upgrade guide
acdvs Jul 16, 2026
fcfbeeb
chore: bump version to 3.0.0
acdvs Jul 16, 2026
ffb952a
fix(module-vars): do not report invalid n modules
acdvs Jul 16, 2026
67d2f66
test(e2e): remove stale expectation
acdvs Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

36 changes: 22 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
name: CI

on:
push:
pull_request:
on: [push, pull_request]

jobs:
lint:
name: Check linting and formatting
name: Check linting, formatting, types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24
- run: |
yarn
yarn prettier . --debug-check
- run: |
yarn lint
pnpm install
pnpm check
pnpm check:types

test:
name: Test rules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24
- run: |
yarn
yarn test
pnpm install
pnpm test
pnpm test:e2e
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

68 changes: 0 additions & 68 deletions AGENTS.md

This file was deleted.

16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,18 @@ export default [
];
```

## Migration from v1.x
## Upgrading

v2 is **flat-config only**. To migrate:

- Replace `.eslintrc.*` with `eslint.config.js`.
- Replace `extends: ['plugin:suitescript/recommended']` with `...suitescript.configs.recommended` (spread).
- Replace `env: { 'suitescript/suitescript2': true }` with `...suitescript.configs.suitescript2`.
- Bump `eslint` to `>= 9` in your project.

`configs.recommended` already declares the AMD globals (`define`, `require`) and the standard browser globals (`window`, `document`, ...) that v1's `env: { amd: true, browser: true }` provided, so `no-undef` keeps working on `define([...], function() {})` modules and on client scripts that touch the DOM.

Stay on `eslint-plugin-suitescript@^1` if you cannot migrate.
See the [upgrade guide](docs/upgrade.md) for details on upgrading the package to a new major version.

## List of supported rules

- [suitescript/api-version](docs/rules/api-version.md): Enforces valid `@NApiVersion` tag values
- [suitescript/entry-points](docs/rules/entry-points.md): Enforces inclusion of at least one entry point based on `@NScriptType`
- [suitescript/log-args](docs/rules/log-args.md): Enforces correct log arguments
- [suitescript/module-vars](docs/rules/module-vars.md): Enforces correct module identifiers for each configured module
- [suitescript/no-amd-name](docs/rules/no-amd-name.md): Restricts naming of AMD modules
- [suitescript/no-extra-modules](docs/rules/no-extra-modules.md): Enforces equal number of module literals and identifiers
- [suitescript/no-invalid-modules](docs/rules/no-invalid-modules.md): Enforces valid SuiteScript modules in `define` array
- [suitescript/no-log-module](docs/rules/no-log-module.md): Restricts loading of the N/log module in favor of global `log`
- [suitescript/no-module-extensions](docs/rules/no-module-extensions.md): Restricts filename extensions on module dependencies
- [suitescript/script-type](docs/rules/script-type.md): Enforces valid `@NScriptType` tag values

## License
Expand Down
37 changes: 37 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended",
"suspicious": {
"useIterableCallbackReturn": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
2 changes: 2 additions & 0 deletions docs/rules/module-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ Specify at least one module name with a corresponding variable name.
- N/https
- N/https/clientCertificate
- N/keyControl
- N/llm
- N/log
- N/pgp
- N/piremoval
- N/plugin
- N/portlet
Expand Down
33 changes: 0 additions & 33 deletions docs/rules/no-amd-name.md

This file was deleted.

41 changes: 0 additions & 41 deletions docs/rules/no-extra-modules.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/rules/no-module-extensions.md

This file was deleted.

33 changes: 0 additions & 33 deletions docs/src/no-amd-name.md

This file was deleted.

Loading