Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
teinett committed Jan 3, 2024
0 parents commit af67528
Showing 10 changed files with 325 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .browserlistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaults
last 2 version
not dead
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8

[{*.json,*.yml}]
indent_size = 2

[*.yaml]
indent_style = space

[*.md]
trim_trailing_whitespace = false
22 changes: 22 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
env:
browser: true
node: true
es6: true
extends:
- eslint:recommended
- plugin:astro/recommended
- plugin:@typescript-eslint/recommended
parser: "@typescript-eslint/parser"
plugins:
- "@typescript-eslint"
parserOptions:
ecmaVersion: 2022
sourceType: module
extraFileExtensions:
- ".astro"
overrides:
- files: "*.astro"
parser: astro-eslint-parser
parserOptions:
parser: "@typescript-eslint/parser"
extraFileExtensions: [".astro"]
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.astro/
node_modules/
package-lock.json
dist/
12 changes: 12 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import("prettier").Config} */
export default {
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
],
};
214 changes: 214 additions & 0 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
extends:
- stylelint-config-standard
- stylelint-config-html
plugins:
- stylelint-order
rules:
order/properties-order:
# Positioning
- all
- position
- top
- right
- bottom
- left
- inset
- inset-block
- inset-block-start
- inset-block-end
- inset-inline
- inset-inline-start
- inset-inline-end
- z-index
# Block
- display
- grid-template
- grid-template-rows
- grid-template-columns
- grid-template-areas
- grid-auto-rows
- grid-auto-columns
- grid-auto-flow
- grid-area
- grid-row
- grid-row-start
- grid-row-end
- grid-column
- grid-column-start
- grid-column-end
- flex
- flex-grow
- flex-shrink
- flex-basis
- flex-flow
- flex-direction
- flex-wrap
- justify-content
- justify-self
- justify-items
- align-content
- align-items
- align-self
- gap
- row-gap
- columns
- column-count
- column-fill
- column-gap
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- order
- float
- clear
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
- margin-block-start
- margin-block-end
- margin-inline-start
- margin-inline-end
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
- padding-block-start
- padding-block-end
- padding-inline-start
- padding-inline-end
- box-sizing
- width
- min-width
- max-width
- inline-size
- min-inline-size
- max-inline-size
- height
- min-height
- max-height
- block-size
- min-block-size
- max-block-size
- overflow
- overflow-x
- overflow-y
# Decoration
- box-shadow
- outline
- outline-width
- outline-style
- outline-color
- outline-offset
- border
- border-width
- border-style
- border-color
- border-top
- border-top-width
- border-top-style
- border-top-color
- border-block-start
- border-block-start-width
- border-block-start-style
- border-block-start-color
- border-bottom
- border-bottom-width
- border-bottom-style
- border-bottom-color
- border-block-end
- border-block-end-width
- border-block-end-style
- border-block-end-color
- border-left
- border-left-width
- border-left-style
- border-left-color
- border-inline-start
- border-inline-start-width
- border-inline-start-style
- border-inline-start-color
- border-right
- border-right-width
- border-right-style
- border-right-color
- border-inline-end
- border-inline-end-width
- border-inline-end-style
- border-inline-end-color
- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-right-radius
- border-bottom-left-radius
- border-start-start-radius
- border-start-end-radius
- border-end-end-radius
- border-end-start-radius
- border-image
- border-image-source
- border-image-slice
- border-image-width
- border-image-outset
- border-image-repeat
- border-collapse
- border-spacing
- stroke
- stroke-dasharray
- stroke-dashoffset
- stroke-linecap
- stroke-linejoin
- stroke-miterlimit
- stroke-opacity
- stroke-width
- background
- background-color
- background-image
- background-position
- background-position-x
- background-position-y
- background-size
- background-clip
- background-origin
- background-attachment
- background-repeat
- background-blend-mode
- fill
- fill-opacity
- fill-rule
- color
# Text
- direction
- writing-mode
- list-style
- list-style-position
- list-style-type
- list-style-image
- text-align
- text-align-last
- line-height
- text-transform
- text-decoration
- text-emphasis
- text-emphasis-color
- text-emphasis-style
- text-emphasis-position
- font
- font-weight
- font-size
- font-family
- font-style
- font-display
- font-variant
- font-size-adjust
- font-stretch
- font-effect
- font-emphasize
- font-emphasize-position
- font-emphasize-style
- font-smooth
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
```
npm install --save-dev editorconfig-checker prettier prettier-plugin-astro eslint eslint-plugin-astro eslint-plugin-jsx-a11y @typescript-eslint/parser @typescript-eslint/eslint-plugin stylelint stylelint-config-html stylelint-config-standard postcss-html stylelint-order autoprefixer postcss-preset-env cssnano astro-compress
```

Добавим конфигурацию в файл `astro.config.mjs`:

````
import { defineConfig } from "astro/config";
import Compress from "astro-compress";
export default defineConfig({
integrations: [
markdoc(),
Compress({
// CSS: false,
// HTML: false,
Image: false,
// JavaScript: false,
SVG: false,
}), // should be last in the list
],
});
```
14 changes: 14 additions & 0 deletions package-scripts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"editorconfig": "editorconfig-checker",
"check": "astro check",
"lintjs": "eslint . --fix",
"lintcss": "stylelint \"src/**/*.{css,astro}\" --fix",
"test": "npm run editorconfig && npm run lintcss && npm run lintjs && npm run check",
},
}
13 changes: 13 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import autoprefixer from 'autoprefixer';
import postcssPresetEnv from 'postcss-preset-env';
import cssnano from 'cssnano';

const settings = {
plugins: [
autoprefixer(),
postcssPresetEnv({ stage: 1 }),
cssnano({ preset: 'default' }),
],
};

export default settings;

0 comments on commit af67528

Please sign in to comment.