chore(eslint/prettier): Update config to apply to all relevant files (#67)

This commit is contained in:
Steven Noorbergen
2024-03-03 16:08:21 +01:00
committed by GitHub
parent 080f418c3e
commit 7fc6cc71cd
7 changed files with 212 additions and 207 deletions

5
.eslintignore Normal file
View File

@@ -0,0 +1,5 @@
!.storybook/
dist/
node_modules/
src/EveDataProvider/esf_pb2.js
src/EveDataProvider/protobuf.js

View File

@@ -1,4 +1,4 @@
const path = require("path")
const path = require("path");
module.exports = {
env: {
@@ -16,16 +16,11 @@ module.exports = {
"plugin:storybook/recommended",
"prettier",
],
plugins: [
"@typescript-eslint",
"import",
"prettier",
"react",
],
"settings": {
"react": {
"version": "detect"
}
plugins: ["@typescript-eslint", "import", "prettier", "react"],
settings: {
react: {
version: "detect",
},
},
rules: {
"newline-per-chained-call": "off",
@@ -35,9 +30,15 @@ module.exports = {
parserOptions: {
project: "./tsconfig.json",
},
ignorePatterns: [
"src/EveDataProvider/esf_pb2.js",
"src/EveDataProvider/protobuf.js",
ignorePatterns: ["src/EveDataProvider/esf_pb2.js", "src/EveDataProvider/protobuf.js"],
overrides: [
{
// The files listed below are part of the build process, so they will be using packages that are listed
// under devDependences and/or peerDependencies, so we need to be lenient with the import/no-extraneous-dependencies
files: [".storybook/**/*.ts", ".eslintrc.js", "rollup.config.mjs"],
rules: {
"import/no-extraneous-dependencies": ["error", { peerDependencies: true, devDependencies: true }],
},
},
],
overrides: [],
}
};

View File

@@ -1,4 +1,3 @@
export const eftFit = `[Loki,Loki basic PVE]
Caldari Navy Ballistic Control System
Caldari Navy Ballistic Control System
@@ -31,185 +30,186 @@ Loki Propulsion - Wake Limiter
Hammerhead II x1
`;
export const hashFit = "fit:v1:H4sIAAAAAAAAClXOMQ7CMAwF0L2n6AE8xD92bLMiRhi4AQMSrND7i7itGrG9JHb+R4QLnet8fyzL8zOf5tv7+7pcaWIoiTY04u7WrcGrLe/LZk+zppkA7CODdTBIGOydKFTVoiRzzfMdIFZrmYdKHOyWlEEdW0ZQW3N7hYNxsJZBHsRgL+ammRagypZBU9RO3yid1bKuEkRyylDy0CxIxTBthXQdScmmIt7I/+72D6JNPx7qugdyAQAA";
export const hashFit =
"fit:v1:H4sIAAAAAAAAClXOMQ7CMAwF0L2n6AE8xD92bLMiRhi4AQMSrND7i7itGrG9JHb+R4QLnet8fyzL8zOf5tv7+7pcaWIoiTY04u7WrcGrLe/LZk+zppkA7CODdTBIGOydKFTVoiRzzfMdIFZrmYdKHOyWlEEdW0ZQW3N7hYNxsJZBHsRgL+ammRagypZBU9RO3yid1bKuEkRyylDy0CxIxTBthXQdScmmIt7I/+72D6JNPx7qugdyAQAA";
export const fullFit = {
"name": "C3 Ratter : NishEM",
"ship_type_id": 29984,
"description": "",
"items": [
{
"flag": 125,
"quantity": 1,
"type_id": 45626
name: "C3 Ratter : NishEM",
ship_type_id: 29984,
description: "",
items: [
{
flag: 125,
quantity: 1,
type_id: 45626,
},
{
flag: 126,
quantity: 1,
type_id: 45591,
},
{
flag: 127,
quantity: 1,
type_id: 45601,
},
{
flag: 128,
quantity: 1,
type_id: 45615,
},
{
flag: 11,
quantity: 1,
type_id: 22291,
},
{
flag: 12,
quantity: 1,
type_id: 22291,
},
{
flag: 13,
quantity: 1,
type_id: 22291,
},
{
flag: 19,
quantity: 1,
type_id: 41218,
},
{
flag: 20,
quantity: 1,
type_id: 35790,
},
{
flag: 21,
quantity: 1,
type_id: 2281,
},
{
flag: 22,
quantity: 1,
type_id: 15766,
},
{
flag: 23,
quantity: 1,
type_id: 19187,
},
{
flag: 24,
quantity: 1,
type_id: 19187,
},
{
flag: 25,
quantity: 1,
type_id: 35790,
},
{
flag: 27,
quantity: 1,
type_id: 25715,
charge: {
type_id: 20308,
},
{
"flag": 126,
"quantity": 1,
"type_id": 45591
},
{
flag: 28,
quantity: 1,
type_id: 25715,
charge: {
type_id: 20308,
},
{
"flag": 127,
"quantity": 1,
"type_id": 45601
},
{
flag: 29,
quantity: 1,
type_id: 25715,
charge: {
type_id: 20308,
},
{
"flag": 128,
"quantity": 1,
"type_id": 45615
},
{
flag: 30,
quantity: 1,
type_id: 25715,
charge: {
type_id: 20308,
},
{
"flag": 11,
"quantity": 1,
"type_id": 22291
},
{
flag: 31,
quantity: 1,
type_id: 25715,
charge: {
type_id: 20308,
},
{
"flag": 12,
"quantity": 1,
"type_id": 22291
},
{
flag: 32,
quantity: 1,
type_id: 25715,
charge: {
type_id: 20308,
},
{
"flag": 13,
"quantity": 1,
"type_id": 22291
},
{
"flag": 19,
"quantity": 1,
"type_id": 41218
},
{
"flag": 20,
"quantity": 1,
"type_id": 35790
},
{
"flag": 21,
"quantity": 1,
"type_id": 2281
},
{
"flag": 22,
"quantity": 1,
"type_id": 15766
},
{
"flag": 23,
"quantity": 1,
"type_id": 19187
},
{
"flag": 24,
"quantity": 1,
"type_id": 19187
},
{
"flag": 25,
"quantity": 1,
"type_id": 35790
},
{
"flag": 27,
"quantity": 1,
"type_id": 25715,
"charge": {
"type_id": 20308
}
},
{
"flag": 28,
"quantity": 1,
"type_id": 25715,
"charge": {
"type_id": 20308
}
},
{
"flag": 29,
"quantity": 1,
"type_id": 25715,
"charge": {
"type_id": 20308
}
},
{
"flag": 30,
"quantity": 1,
"type_id": 25715,
"charge": {
"type_id": 20308
}
},
{
"flag": 31,
"quantity": 1,
"type_id": 25715,
"charge": {
"type_id": 20308
}
},
{
"flag": 32,
"quantity": 1,
"type_id": 25715,
"charge": {
"type_id": 20308
}
},
{
"flag": 33,
"quantity": 1,
"type_id": 28756
},
{
"flag": 92,
"quantity": 1,
"type_id": 31724
},
{
"flag": 93,
"quantity": 1,
"type_id": 31824
},
{
"flag": 94,
"quantity": 1,
"type_id": 31378
},
{
"flag": 5,
"quantity": 3720,
"type_id": 24492
},
{
"flag": 5,
"quantity": 5472,
"type_id": 2679
},
{
"flag": 5,
"quantity": 1,
"type_id": 35795
},
{
"flag": 5,
"quantity": 1,
"type_id": 35794
},
{
"flag": 5,
"quantity": 8,
"type_id": 30486
},
{
"flag": 5,
"quantity": 1,
"type_id": 35794
},
{
"flag": 5,
"quantity": 396,
"type_id": 24492
}
]
};
},
{
flag: 33,
quantity: 1,
type_id: 28756,
},
{
flag: 92,
quantity: 1,
type_id: 31724,
},
{
flag: 93,
quantity: 1,
type_id: 31824,
},
{
flag: 94,
quantity: 1,
type_id: 31378,
},
{
flag: 5,
quantity: 3720,
type_id: 24492,
},
{
flag: 5,
quantity: 5472,
type_id: 2679,
},
{
flag: 5,
quantity: 1,
type_id: 35795,
},
{
flag: 5,
quantity: 1,
type_id: 35794,
},
{
flag: 5,
quantity: 8,
type_id: 30486,
},
{
flag: 5,
quantity: 1,
type_id: 35794,
},
{
flag: 5,
quantity: 396,
type_id: 24492,
},
],
};

View File

@@ -1,12 +1,9 @@
import type { StorybookConfig } from "@storybook/react-webpack5";
import type { Configuration } from "webpack";
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions"],
framework: {
name: "@storybook/react-webpack5",
options: {},
@@ -17,13 +14,13 @@ const config: StorybookConfig = {
core: {
disableTelemetry: true,
},
webpackFinal: async (config: any) => {
webpackFinal: async (webpackConfig: Configuration) => {
return {
...config,
...webpackConfig,
experiments: {
asyncWebAssembly: true
}
}
asyncWebAssembly: true,
},
};
},
};
export default config;

View File

@@ -9,8 +9,8 @@
"build": "rollup -c",
"build-storybook": "storybook build",
"dev": "storybook dev -p 6006 --no-open",
"lint": "eslint src --ext .js,.tsx --cache && prettier -c src",
"prettier": "prettier -w src"
"lint": "eslint .storybook src --ext .js,.ts,.tsx --cache && prettier -c .storybook src",
"prettier": "prettier -w .storybook src"
},
"repository": {
"type": "git",

4
src/types.d.ts vendored
View File

@@ -1,4 +1,4 @@
declare module "*.module.css" {
const css: any;
export default css;
const classes: { [key: string]: string };
export default classes;
}

View File

@@ -13,6 +13,8 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es2016",
}
"target": "es2016"
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", ".storybook/*.ts"],
"exclude": ["node_modules"]
}