Skip to content

Commit 4515970

Browse files
committed
eslint: use new config format (plus update deps)
1 parent 2ccecda commit 4515970

File tree

17 files changed

+884
-676
lines changed

17 files changed

+884
-676
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 58 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ gts lint *.ts
5353

5454
### Working with eslint
5555

56-
Under the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. To use the shared `eslint` configuration, create an `.eslintrc` in your project directory, and extend the shared config:
56+
Under the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. To use the shared `eslint` configuration, create an `eslint.config.js` in your project directory, and extend the shared config:
5757

58-
```yml
59-
---
60-
extends:
61-
- './node_modules/gts'
58+
```js
59+
module.exports = [
60+
...require('gts'),
61+
];
6262
```
6363

6464
If you don't want to use the `gts` CLI, you can drop down to using the module as a basic `eslint` config, and just use the `eslint` cli:

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
'use strict';
2+
const config = require('./src/index.js');
3+
const ignores = require('./eslint.ignores.js');
4+
const defineConfig = require('eslint/config').defineConfig;
5+
6+
module.exports = defineConfig([{ignores}, ...config]);

eslint.ignores.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = ['build/', '**/node_modules/', 'template/', 'test/fixtures/'];

0 commit comments

Comments
 (0)