2
0
Эх сурвалжийг харах

Add sort-imports line rule

Lutz Roeder 1 жил өмнө
parent
commit
079d07dcd9

+ 1 - 1
publish/eslint.config.js

@@ -212,7 +212,7 @@ export default [
             // 'require-unicode-regexp': 'error',
             'require-yield': 'error',
             'semi': ['error', 'always'],
-            // 'sort-imports': 'error',
+            'sort-imports': 'error',
             // 'sort-keys': 'error',
             'sort-vars': 'error',
             'space-before-blocks': 'error',

+ 1 - 1
source/app.js

@@ -1,11 +1,11 @@
 
+import * as base from './base.js';
 import * as electron from 'electron';
 import * as fs from 'fs';
 import * as os from 'os';
 import * as path from 'path';
 import * as process from 'process';
 import * as url from 'url';
-import * as base from './base.js';
 
 const app = {};
 

+ 1 - 1
source/dlc.js

@@ -1,6 +1,6 @@
 
-import * as text from './text.js';
 import * as flatbuffers from './flatbuffers.js';
+import * as text from './text.js';
 
 const dlc = {};
 

+ 1 - 1
source/electron.mjs

@@ -1,11 +1,11 @@
 
+import * as base from './base.js';
 import * as electron from 'electron';
 import * as fs from 'fs';
 import * as http from 'http';
 import * as https from 'https';
 import * as path from 'path';
 import * as url from 'url';
-import * as base from './base.js';
 import * as view from './view.js';
 
 const host = {};

+ 7 - 7
source/view.js

@@ -1,15 +1,15 @@
 
 import * as base from './base.js';
-import * as zip from './zip.js';
-import * as tar from './tar.js';
-import * as json from './json.js';
-import * as text from './text.js';
-import * as xml from './xml.js';
-import * as protobuf from './protobuf.js';
 import * as flatbuffers from './flatbuffers.js';
+import * as grapher from './grapher.js';
 import * as hdf5 from './hdf5.js';
+import * as json from './json.js';
+import * as protobuf from './protobuf.js';
 import * as python from './python.js';
-import * as grapher from './grapher.js';
+import * as tar from './tar.js';
+import * as text from './text.js';
+import * as xml from './xml.js';
+import * as zip from './zip.js';
 
 const view =  {};
 const markdown = {};

+ 4 - 4
test/worker.js

@@ -1,14 +1,14 @@
 
+import * as base from '../source/base.js';
 import * as fs from 'fs/promises';
 import * as path from 'path';
 import * as process from 'process';
+import * as python from '../source/python.js';
+import * as tar from '../source/tar.js';
 import * as url from 'url';
+import * as view from '../source/view.js';
 import * as worker_threads from 'worker_threads';
-import * as base from '../source/base.js';
 import * as zip from '../source/zip.js';
-import * as tar from '../source/tar.js';
-import * as python from '../source/python.js';
-import * as view from '../source/view.js';
 
 const access = async (path) => {
     try {

+ 2 - 2
tools/circle-script.js

@@ -1,8 +1,8 @@
 
-import * as path from 'path';
+import * as flatc from './flatc.js';
 import * as fs from 'fs/promises';
+import * as path from 'path';
 import * as url from 'url';
-import * as flatc from './flatc.js';
 
 /* eslint-disable no-extend-native */
 

+ 2 - 2
tools/megengine-script.js

@@ -1,8 +1,8 @@
 
-import * as path from 'path';
+import * as flatc from './flatc.js';
 import * as fs from 'fs/promises';
+import * as path from 'path';
 import * as url from 'url';
-import * as flatc from './flatc.js';
 
 const main = async () => {
     const dirname = path.dirname(url.fileURLToPath(import.meta.url));

+ 2 - 2
tools/mslite-script.js

@@ -1,8 +1,8 @@
 
+import * as flatc from './flatc.js';
+import * as fs from 'fs/promises';
 import * as path from 'path';
 import * as url from 'url';
-import * as fs from 'fs/promises';
-import * as flatc from './flatc.js';
 
 const main = async () => {
     const dirname = path.dirname(url.fileURLToPath(import.meta.url));

+ 2 - 2
tools/tflite-script.js

@@ -1,8 +1,8 @@
 
-import * as path from 'path';
+import * as flatc from './flatc.js';
 import * as fs from 'fs/promises';
+import * as path from 'path';
 import * as url from 'url';
-import * as flatc from './flatc.js';
 
 /* eslint-disable no-extend-native */