ci: integrations job
ADD
.github/workflows/integrations.yml
+name: Integrations
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ eslint:
+ name: Eslint integration
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.16.0'
+ - uses: actions/checkout@v2
+ with:
+ path: "rome"
+ - uses: actions/checkout@v2
+ with:
+ repository: 'sveltejs/svelte'
+ path: "svelte"
+ - name: Eslint svelte
+ run: |
+ cd rome
+ cd ../svelte
+ npm install
+ mkdir dir .config
+ touch .config/rome.json
+ echo '{ "root": true, "name": "rome-integration-eslint", "format": { "enabled": false }, "lint": { "enabled": false, "ignore": ["node_modules", "test", "site"] }, "integrations": { "eslint": { "enabled": true } } }' > .config/rome.json
+ ../rome/rome start
+ ../rome/rome check ./src --timing
+ prettier:
+ name: Prettier integration
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '14.16.0'
+ - uses: actions/checkout@v2
+ with:
+ path: "rome"
+ - uses: actions/checkout@v2
+ with:
+ repository: 'vercel/next.js'
+ path: "nextjs"
+ - name: Prettier next.js
+ run: |
+ cd rome
+ cd ../nextjs
+ npm install prettier
+ mkdir dir .config
+ touch .config/rome.json
+ echo '{ "root": true, "name": "rome-integration-prettier", "format": { "enabled": false }, "lint": { "enabled": false, "ignore": ["node_modules", "test", "site"] }, "integrations": { "prettier": { "enabled": true } } }' > .config/rome.json
+# ../rome/rome start
+# ../rome/rome check --timing

MODIFY
internal/project/integrations/loadEslint.ts
internal/project/integrations/loadEslint.ts
import {consumeUnknown} from "@internal/consume";
import {DIAGNOSTIC_CATEGORIES} from "@internal/diagnostics";
import {IntegrationEslintConfig, arrayOfStrings} from "@internal/project";
-import {json} from "@internal/codec-config";
+import {json5} from "@internal/codec-config";
export function loadEslint(file: string): Partial<IntegrationEslintConfig> {
const config: Partial<IntegrationEslintConfig> = {};
- const data = json.parse({input: file});
+ const data = json5.parse({input: file});
const eslint = consumeUnknown(data, DIAGNOSTIC_CATEGORIES.eslint, "json");
if (eslint.has("globInputPaths")) {

ci: integrations job (#1622)