-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #637 from umbraco/release/1.5.0
Release/1.5.0
- Loading branch information
Showing
367 changed files
with
18,711 additions
and
13,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | ||
{ | ||
"name": "Node.js & TypeScript", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "npm install", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"esbenp.prettier-vscode", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
"portsAttributes": { | ||
"6006": { | ||
"label": "Storybook", | ||
"onAutoForward": "notify" | ||
} | ||
} | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"cSpell.words": ["combobox", "Umbraco"] | ||
"cSpell.words": ["combobox", "cssprop", "noopener", "noreferrer", "Umbraco"], | ||
"npm.enableRunFromFolder": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "build", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [], | ||
"label": "npm: build", | ||
"detail": "Builds each package" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
'use strict'; | ||
|
||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
/** @type {import('eslint').Rule.RuleModule} */ | ||
'uui-class-prefix': { | ||
meta: { | ||
type: 'problem', | ||
docs: { | ||
description: | ||
'Ensure that all class declarations are prefixed with "UUI"', | ||
category: 'Best Practices', | ||
recommended: true, | ||
}, | ||
schema: [], | ||
}, | ||
create: function (context) { | ||
function checkClassName(node) { | ||
if (node.id && node.id.name && !node.id.name.startsWith('UUI')) { | ||
context.report({ | ||
node: node.id, | ||
message: 'Class declaration should be prefixed with "UUI"', | ||
}); | ||
} | ||
} | ||
|
||
return { | ||
ClassDeclaration: checkClassName, | ||
}; | ||
}, | ||
}, | ||
|
||
/** @type {import('eslint').Rule.RuleModule}*/ | ||
'prefer-static-styles-last': { | ||
meta: { | ||
type: 'suggestion', | ||
docs: { | ||
description: | ||
'Enforce the "styles" property with the static modifier to be the last property of a class that ends with "Element".', | ||
category: 'Best Practices', | ||
recommended: true, | ||
}, | ||
fixable: 'code', | ||
schema: [], | ||
}, | ||
create: function (context) { | ||
return { | ||
ClassDeclaration(node) { | ||
const className = node.id.name; | ||
if (className.endsWith('Element')) { | ||
const staticStylesProperty = node.body.body.find(bodyNode => { | ||
return ( | ||
bodyNode.type === 'PropertyDefinition' && | ||
bodyNode.key.name === 'styles' && | ||
bodyNode.static | ||
); | ||
}); | ||
if (staticStylesProperty) { | ||
const lastProperty = node.body.body[node.body.body.length - 1]; | ||
if (lastProperty.key.name !== staticStylesProperty.key.name) { | ||
context.report({ | ||
node: staticStylesProperty, | ||
message: | ||
'The "styles" property should be the last property of a class declaration.', | ||
data: { | ||
className: className, | ||
}, | ||
fix: function (fixer) { | ||
const sourceCode = context.getSourceCode(); | ||
const staticStylesPropertyText = | ||
sourceCode.getText(staticStylesProperty); | ||
return [ | ||
fixer.replaceTextRange(staticStylesProperty.range, ''), | ||
fixer.insertTextAfterRange( | ||
lastProperty.range, | ||
'\n \n ' + staticStylesPropertyText | ||
), | ||
]; | ||
}, | ||
}); | ||
} | ||
} | ||
} | ||
}, | ||
}; | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.