chore(lint): Clean up and linting

This commit is contained in:
2023-07-06 01:35:13 +03:00
parent f642289650
commit add42bc2a3
7 changed files with 77 additions and 46 deletions

44
.editorconfig Normal file
View File

@@ -0,0 +1,44 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 160
tab_width = 2
trim_trailing_whitespace = true
[*.css]
indent_size = 4
tab_width = 4
[{*.sass,*.scss}]
tab_width = 4
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}]
indent_size = 4
tab_width = 4
[{*.ats,*.cts,*.mts,*.ts}]
indent_size = 4
tab_width = 4
[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml,application,branch-usage-checker}]
indent_size = 4
max_line_length = 110
tab_width = 4
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
indent_size = 2
tab_width = 2
[{*.mk,GNUmakefile,makefile}]
tab_width = 4
[{*.tf,*.tfvars}]
tab_width = 4
[*.md,.github/workflows/*.yml]
max_line_length = 300

View File

@@ -2,9 +2,9 @@ name: NPM Install and build
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
jobs:
build:
@@ -13,16 +13,16 @@ jobs:
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run build
- name: Build
run: |
npm install
npm run build

View File

@@ -3,8 +3,6 @@
"version": "1.0.0",
"description": "Generic landing page with some candy",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "npx mix watch",
"build": "npx mix build",
"dev": "npx mix build",
"prod": "npx mix build -p"

View File

@@ -1,7 +1,7 @@
document.addEventListener("DOMContentLoaded", () => {
const container = document.querySelector("h1");
const hostname = window.location.hostname || document.title;
const container = document.querySelector("h1");
const hostname = window.location.hostname || document.title;
container.textContent = hostname;
document.title = hostname;
container.textContent = hostname;
document.title = hostname;
});

View File

@@ -1,20 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<title>hi there!</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="app.css" rel="stylesheet" />
<script src="app.js"></script>
</head>
</head>
<body class="h-screen bg-gray-50">
<body class="h-screen bg-gray-50">
<div class="flex items-center justify-between h-screen px-8 py-16 mx-auto min-w-max max-w-7xl">
<h1 class="text-3xl font-extrabold tracking-tight text-gray-900">
hi there!
</h1>
<h1 class="text-3xl font-extrabold tracking-tight text-gray-900">hi there!</h1>
</div>
</body>
</body>
</html>

View File

@@ -1,10 +1,3 @@
module.exports = {
content: ["./src/**/*.html", "./src/**/*.js"],
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
export default {
content: ["./src/index.html"],
};

View File

@@ -1,14 +1,14 @@
const mix = require('laravel-mix');
require('mix-tailwindcss');
const mix = require("laravel-mix");
require("mix-tailwindcss");
mix
.setResourceRoot('src')
.setPublicPath('dist')
.browserSync()
.disableSuccessNotifications();
.setResourceRoot("src")
.setPublicPath("dist")
.browserSync()
.disableSuccessNotifications();
mix
.js('src/app.js', 'dist')
.sass('src/app.scss', 'dist')
.tailwind()
.copy('src/index.html', 'dist');
.js("src/app.js", "dist")
.sass("src/app.scss", "dist")
.tailwind()
.copy("src/index.html", "dist");