Skip to content

Commit

Permalink
Enforce import linting (#18323)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Nov 26, 2022
1 parent ec22dec commit 89d85e3
Show file tree
Hide file tree
Showing 51 changed files with 463 additions and 547 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"plugins": [
"@typescript-eslint",
"import",
"prettier",
"jsdoc",
"prefer-arrow-functions",
Expand All @@ -14,9 +15,17 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended",
"plugin:jsdoc/recommended"
],
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
Expand All @@ -34,6 +43,14 @@
"curly": "error",
"default-case": "off",
"default-case-last": "error",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": ["builtin", "external", "parent", "sibling", "index", "type"]
}
],
"import/no-named-as-default-member": "off",
"jsdoc/check-param-names": "error",
"jsdoc/require-description": "warn",
"jsdoc/require-jsdoc": [
Expand Down
4 changes: 2 additions & 2 deletions index.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

import { CompatStatement } from './types/types.js';

import assert from 'node:assert/strict';

import { CompatStatement } from './types/types.js';

import bcd from './index.js';

describe('Using BCD', () => {
Expand Down
3 changes: 1 addition & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* This file is a part of @mdn/browser-compat-data
* See LICENSE file for more information. */

import { CompatData } from './types/types.js';

import fs from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

import { fdir } from 'fdir';

import { CompatData } from './types/types.js';
import extend from './scripts/lib/extend.js';
import { normalizePath, walk } from './utils/index.js';

Expand Down
Loading

0 comments on commit 89d85e3

Please sign in to comment.