Skip to content

Commit

Permalink
Eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Powerm1nt committed Apr 20, 2024
1 parent ca7dc71 commit b210081
Show file tree
Hide file tree
Showing 61 changed files with 11,221 additions and 20,725 deletions.
2 changes: 1 addition & 1 deletion .bung.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ dirs:
- "./src/Misc"

layouts:
- "./src/Layouts"
- "./src/Layouts"
25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '42 1 * * 0'
- cron: "42 1 * * 0"

jobs:
analyze:
Expand All @@ -32,39 +32,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
19 changes: 14 additions & 5 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
module.exports = {
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/preset-scss", "@storybook/addon-postcss", "@storybook/addon-interactions", "storybook-dark-mode", "@storybook/addon-mdx-gfm"],
"framework": {
name: "@storybook/react-vite",
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/preset-scss',
'@storybook/addon-postcss',
'@storybook/addon-interactions',
'storybook-dark-mode',
'@storybook/addon-mdx-gfm',
'@chromatic-com/storybook'
],
framework: {
name: '@storybook/react-vite',
options: {}
},
docs: {
autodocs: true
}
};
}
10 changes: 5 additions & 5 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
date: /Date$/
}
}
}
13 changes: 7 additions & 6 deletions büng/src/Commands/MainCommand.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const { Command } = require('commander')
const { version } = require('../../package.json')
const {
makeComponent,
makeStory
} = require('../Utils/CompntMgmt')
const { makeComponent, makeStory } = require('../Utils/CompntMgmt')
const program = new Command()

function mainCommand (argv) {
Expand All @@ -12,12 +9,16 @@ function mainCommand (argv) {
.description('Büng, the component maker.')
.version(version)

program.command('make-component <name> <category>').description('Make a new component with story.')
program
.command('make-component <name> <category>')
.description('Make a new component with story.')
.action((name, category) => {
makeComponent(name, category)
})

program.command('make-story <name> <category>').description('Make a new story.')
program
.command('make-story <name> <category>')
.description('Make a new story.')
.action((name, category) => {
makeStory(name, category)
})
Expand Down
16 changes: 8 additions & 8 deletions büng/src/Templates/Test.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import React from "react";

import { Test } from './Test'
import { Test } from "./Test";

export default {
title: 'Category/Test',
component: Test
}
title: "Category/Test",
component: Test,
};

const Template = (args :any) => <Test {...args} />
const Template = (args: any) => <Test {...args} />;

export const Default = Template.bind({})
export const Default = Template.bind({});
// @ts-ignore
Default.args = {}
Default.args = {};
27 changes: 14 additions & 13 deletions büng/src/Templates/Test.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import React from 'react'
import PropTypes, { InferProps } from 'prop-types'
import styled from 'styled-components'
import React from "react";
import PropTypes, { InferProps } from "prop-types";
import styled from "styled-components";

const Div = styled.div`
color: deeppink;
`
`;

export function Test ({ children, className, ...props }: InferProps<typeof Test.propTypes>) {
export function Test({
children,
className,
...props
}: InferProps<typeof Test.propTypes>) {
return (
<Div
className={['CATEGORY__test', 'test', className].join(' ')}
{...props}
>
Hello World !
<Div className={["CATEGORY__test", "test", className].join(" ")} {...props}>
Hello World !
</Div>
)
);
}

Test.propTypes = {
className: PropTypes.string,
children: PropTypes.any,
props: PropTypes.any
}
props: PropTypes.any,
};
Loading

0 comments on commit b210081

Please sign in to comment.