Skip to content

Oxlint v1

Since v4.3 the default JavaScript linter in Newlogic UI is Oxlint v1.

This guide shows how to migrate older projects. The exact steps depend on whether you are upgrading from v4.0 or from v4.1+.

Migrate from v4.0

Projects on v4.0 still use the older TailwindCSS v3 toolchain, so it is not a good idea to rely on ncu -u for the whole upgrade. That can easily pull in unrelated breaking changes.

For this migration, remove only the linting-related packages first and keep the Tailwind-related packages in place until you do a separate Tailwind migration. See TailwindCSS v4.

Typical devDependencies in v4.0 looked like this:

jsonc
{
  "devDependencies": {
    "@newlogic-digital/core": "^3.0.0",
    "@stylistic/stylelint-config": "^2.0.0", 
    "@tailwindcss/container-queries": "^0.1.1",
    "@vituum/vite-plugin-tailwindcss": "^1.2.0",
    "eslint": "^9.19.0", 
    "neostandard": "^0.12.0", 
    "npm-check-updates": "^17.1.14", 
    "stylelint-config-standard": "^37.0.0", 
    "tailwindcss": "^3.4.17"
  }
}

Use these commands:

bash
npm remove -D @stylistic/stylelint-config eslint neostandard npm-check-updates stylelint-config-standard
npm install -D @newlogic-digital/core vite

Keep postcss if you still use TailwindCSS v3

If you are updating @newlogic-digital/core but still staying on the old TailwindCSS v3 stack, explicitly keep the Vite CSS transformer on postcss.

js
export default defineConfig({
  plugins: [
    core({ 
      css: { 
        transformer: 'postcss'
      } 
    }) 
  ]
})

This avoids breaking the old TailwindCSS v3 setup while Newlogic Core already defaults to lightningcss.

Migrate from v4.1 or v4.2

For v4.1+, the migration is almost the same as the v4.2 -> v4.3 process described in the release blog post. The only extra package you still need to remove in older v4.1 projects is neostandard.

Typical devDependencies in v4.1 looked like this:

jsonc
{
  "devDependencies": {
    "@newlogic-digital/core": "^3.0.1",
    "@stylistic/stylelint-config": "^2.0.0", 
    "eslint": "^9.25.1", 
    "neostandard": "^0.12.1", 
    "npm-check-updates": "^18.0.1", 
    "stylelint-config-standard": "^38.0.0"
  }
}

Use these commands:

bash
ncu -u && npm update
npm remove -D @stylistic/stylelint-config eslint neostandard npm-check-updates stylelint-config-standard
npm install -D @tailwindcss/vite vite

Replace the lint scripts

In package.json, replace the old ESLint scripts:

jsonc
"scripts": {
  "eslint": "eslint 'src/scripts/**/*.js'", 
  "eslint-fix": "eslint 'src/scripts/**/*.js' --fix", 
  "oxlint": "oxlint", 
  "oxlint-fix": "oxlint --fix"
},

Update .gitlab-ci.yml

If your project uses the default GitLab CI setup, update the lint job list there too:

yaml
build-node:
  stage: build
  variables:
    TESTS_BUILD: '["eslint", "stylelint"]'
    TESTS_BUILD: '["oxlint", "stylelint"]'

Replace the root config files

Replace eslint.config.js with .oxlintrc.json and replace .stylelintrc with .stylelintrc.json.

.oxlintrc.json

json
{
  "extends": ["./node_modules/@newlogic-digital/core/eslint-stylistic.json"],
  "ignorePatterns": ["**/+.js"]
}

.stylelintrc.json

json
{
  "extends": ["./node_modules/@newlogic-digital/core/stylelint-config.json"],
  "ignoreFiles": ["**/+.css"]
}

Clean up scripts/main.js

When updating to Newlogic Core 4 and Vite 8, you can remove the following line from scripts/main.js as a cleanup:

js
import.meta.glob('/src/assets/**') 

With Newlogic Core 4, assets are handled automatically, so this line is no longer needed in main.js.

Final check

After the migration, run your lint checks and resolve any reported issues first:

bash
npm run oxlint
npm run stylelint

Only add local overrides for rules that are not already covered by the base config, so you avoid duplicating existing configuration.

Released under the MIT License.