added eslint for astro
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"unicorn/prefer-top-level-await": "off"
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,5 @@ module.exports = {
|
||||
banner,
|
||||
name: 'adminlte'
|
||||
},
|
||||
plugins: [typescript({
|
||||
declaration: true,
|
||||
declarationDir: 'types'
|
||||
})]
|
||||
plugins: [typescript()]
|
||||
}
|
||||
|
||||
24
src/html/.eslintrc.json
Normal file
24
src/html/.eslintrc.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"plugin:astro/recommended"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
// Define the configuration for `.astro` file.
|
||||
"files": ["*.astro"],
|
||||
// Allows Astro components to be parsed.
|
||||
"parser": "astro-eslint-parser",
|
||||
// Parse the script in `.astro` as TypeScript by adding the following configuration.
|
||||
// It's the setting you need when using TypeScript.
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"extraFileExtensions": [".astro"]
|
||||
},
|
||||
"rules": {
|
||||
// override/add rules settings here, such as:
|
||||
// "astro/no-set-html-directive": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": "astro/tsconfigs/base"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
const { path } = Astro.props
|
||||
const distPath = (path != undefined) ? path : '../../../dist'
|
||||
const adminlteJsUrl = distPath + '/js/adminlte.js'
|
||||
---
|
||||
<!-- OPTIONAL SCRIPTS -->
|
||||
<!-- overlayscrollbars -->
|
||||
@@ -14,7 +15,7 @@ const distPath = (path != undefined) ? path : '../../../dist'
|
||||
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<!-- AdminLTE App -->
|
||||
<script src={distPath + '/js/adminlte.js'}></script>
|
||||
<script src={adminlteJsUrl} is:inline></script>
|
||||
|
||||
<!-- OPTIONAL SCRIPTS -->
|
||||
<script is:inline>
|
||||
|
||||
Reference in New Issue
Block a user