mirror of
https://github.com/iconify/iconify.git
synced 2024-11-16 09:37:09 +00:00
chore: fix eslint config and main build script
This commit is contained in:
parent
d0a135fb87
commit
c5d1a469d1
@ -13,8 +13,8 @@
|
||||
"packageManager": "pnpm@9.12.3",
|
||||
"scripts": {
|
||||
"clean": "rm -rf */*/node_modules",
|
||||
"build": "pnpm recursive --filter \"./(packages|iconify-icon|components)/**\" run build",
|
||||
"test": "pnpm recursive --filter \"./(packages|iconify-icon|components)/**\" run test"
|
||||
"build": "pnpm recursive --workspace-concurrency=1 --filter \"./(packages|iconify-icon|components)/**\" run build",
|
||||
"test": "pnpm recursive --workspace-concurrency=1 --filter \"./(packages|iconify-icon|components)/**\" run test"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"pnpm": {
|
||||
|
@ -42,10 +42,7 @@ export default [
|
||||
sourceType: 'commonjs',
|
||||
|
||||
parserOptions: {
|
||||
tsconfigRootDir:
|
||||
'/Users/slava/Documents/dev/iconify/iconify/iconify-dev/packages/core',
|
||||
project: ['tsconfig.json', 'tests/tsconfig.json'],
|
||||
extraFileExtensions: ['.cjs'],
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -1,54 +1,57 @@
|
||||
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
||||
import globals from "globals";
|
||||
import tsParser from "@typescript-eslint/parser";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import js from "@eslint/js";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
||||
import globals from 'globals';
|
||||
import tsParser from '@typescript-eslint/parser';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import js from '@eslint/js';
|
||||
import { FlatCompat } from '@eslint/eslintrc';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all,
|
||||
});
|
||||
|
||||
export default [{
|
||||
ignores: ["**/lib"],
|
||||
}, ...compat.extends(
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:prettier/recommended",
|
||||
), {
|
||||
plugins: {
|
||||
"@typescript-eslint": typescriptEslint,
|
||||
},
|
||||
export default [
|
||||
{
|
||||
ignores: ['**/lib'],
|
||||
},
|
||||
...compat.extends(
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||
'plugin:prettier/recommended'
|
||||
),
|
||||
{
|
||||
plugins: {
|
||||
'@typescript-eslint': typescriptEslint,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
Atomics: "readonly",
|
||||
SharedArrayBuffer: "readonly",
|
||||
},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
Atomics: 'readonly',
|
||||
SharedArrayBuffer: 'readonly',
|
||||
},
|
||||
|
||||
parser: tsParser,
|
||||
ecmaVersion: 5,
|
||||
sourceType: "commonjs",
|
||||
parser: tsParser,
|
||||
ecmaVersion: 5,
|
||||
sourceType: 'commonjs',
|
||||
|
||||
parserOptions: {
|
||||
tsconfigRootDir: "/Users/slava/Documents/dev/iconify/iconify/iconify-dev/packages/utils",
|
||||
project: ["tsconfig.json", "tests/tsconfig.json"],
|
||||
extraFileExtensions: [".cjs"],
|
||||
},
|
||||
},
|
||||
parserOptions: {
|
||||
project: ['tsconfig.json', 'tests/tsconfig.json'],
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
"no-mixed-spaces-and-tabs": ["off"],
|
||||
"no-unused-vars": ["off"],
|
||||
},
|
||||
}, {
|
||||
files: ["src/**/*.ts", "tests/*.ts"],
|
||||
}];
|
||||
rules: {
|
||||
'no-mixed-spaces-and-tabs': ['off'],
|
||||
'no-unused-vars': ['off'],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/**/*.ts', 'tests/*.ts'],
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user