Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite migration: ESLint fixes #155

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
settings: { react: { version: "18.2" } },
plugins: ["react-refresh", "simple-import-sort", "import"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"no-class-assign": "off",
"no-unused-vars": "off",
"simple-import-sort/imports": [
"error",
{
groups: [
["^\\u0000"],
["^@?\\w"],
[
"^(actions|components|eventManagers|middleware|reducers|serverPropTypes|style|utils)",
],
["^"],
["^\\."],
],
},
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"max-len": [
"error",
{
code: 88,
},
],
quotes: [1, "single"],
},
};
50 changes: 21 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Vim stuff
*.sw[po]
*.vim
*.lvimrc

# Backups
*~

# Builds
/dakara*.zip
24 changes: 12 additions & 12 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"extends": "stylelint-config-sass-guidelines",
"rules": {
"color-named": "always-where-possible",
"function-parentheses-space-inside": "never-single-line",
"indentation": 4,
"max-nesting-depth": 99,
"scss/selector-no-redundant-nesting-selector": null,
"selector-max-compound-selectors": 9,
"selector-max-id": 1,
"selector-no-qualifying-type": [false, {"ignore": ["attribute", "class"]}],
"string-quotes": "double"
}
"extends": "stylelint-config-sass-guidelines",
"rules": {
"color-named": "always-where-possible",
"function-parentheses-space-inside": "never-single-line",
"indentation": 4,
"max-nesting-depth": 99,
"scss/selector-no-redundant-nesting-selector": null,
"selector-max-compound-selectors": 9,
"selector-max-id": 1,
"selector-no-qualifying-type": [null, { "ignore": ["attribute", "class"] }],
"string-quotes": "double"
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npm install
### Running developement server

```shell
npm start
npm run dev
```

This runs the app in the development mode.
Expand All @@ -45,7 +45,7 @@ You will also see any lint errors in the console.
npm run build
```

This builds the app for production to the `build` folder.
This builds the app for production to the `dist` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

## Development
Expand Down
30 changes: 0 additions & 30 deletions config-overrides.js

This file was deleted.

12 changes: 2 additions & 10 deletions create_archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@ archive_name=dakara-client-web_$version_number.zip
echo "Creating build, please wait..."
npm run build


# Go to build directory
cd build

# Move index.html to static dir
mv index.html static

# archive the static folder
zip -r ../"$archive_name" static
# archive the dist folder
zip -r "$archive_name" dist

echo "Archive created in $archive_name"

37 changes: 37 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dakara</title>
<meta name="description" content="Dakara web client" />

<!-- Design -->
<link rel="stylesheet"
href="https://maxst.icons8.com/vue-static/landings/line-awesome/line-awesome/1.3.0/css/line-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,100,700,300" type="text/css">

<!--Favicons-->
<link rel="apple-touch-icon" sizes="120x120" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#8612a1">
<link rel="shortcut icon" href="/favicons/favicon.ico">

<meta name="apple-mobile-web-app-title" content="Dakara">
<meta name="application-name" content="Dakara">
<meta name="color-scheme" content="dark">
<meta name="theme-color" content="#8612a1">

<link rel="manifest" href="/manifest.json">
<meta name="msapplication-config" content="/browserconfig.xml">
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>

</html>
Loading