Skip to content

Commit

Permalink
Merge pull request #28 from mansona/lint
Browse files Browse the repository at this point in the history
update eslint
  • Loading branch information
mansona authored Nov 12, 2024
2 parents 60bf915 + 24390ff commit b25b43b
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 144 deletions.
21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

13 changes: 12 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm run lint

tests:
runs-on: ubuntu-latest

Expand All @@ -22,7 +34,6 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm run lint
- run: pnpm test

ember-template-lint-versions:
Expand Down
16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import globals from "globals";
import pluginJs from "@eslint/js";

export default [
{
languageOptions: { globals: globals.node }
},
pluginJs.configs.recommended,
{
languageOptions: {

globals: globals.mocha,
},
files: ['test/*.mjs']
}
];
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-global-assign
require = require('esm')(module);
// eslint-disable-next-line import/extensions
module.exports = require('./main.mjs');
3 changes: 1 addition & 2 deletions main.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { readFileSync, writeFileSync } from 'fs';
import importCwd from 'import-cwd';
import walkSync from 'walk-sync';
import { join } from 'path';

Expand All @@ -18,7 +17,7 @@ function getFiles(cwd) {
.filter((line) => !line.startsWith('!'))
.map((line) => line.replace(/^\//, ''))
.map((line) => line.replace(/\/$/, '/*'));
} catch (e) {
} catch {
// noop
}

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
},
"dependencies": {
"esm": "^3.2.25",
"import-cwd": "^3.0.0",
"walk-sync": "^2.2.0"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"chai": "^4.3.4",
"ember-template-lint": "^6.0.0",
"eslint": "^8.15.0",
"eslint": "^9.14.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.31.0",
"fixturify-project": "^7.1.3",
"globals": "^15.12.0",
"mocha": "^10.0.0",
"release-plan": "^0.9.0"
},
Expand Down
Loading

0 comments on commit b25b43b

Please sign in to comment.