зеркало из https://github.com/mozilla/Spoke.git
Stricter eslint disables
This commit is contained in:
Родитель
e8d0e69f4d
Коммит
a2ee93c908
|
@ -156,7 +156,7 @@ class AssetExplorerPanelContainer extends Component {
|
|||
const folderName = this.state.newFolderName;
|
||||
const directoryURI = this.state.selectedDirectory || this.state.tree.uri;
|
||||
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
if (!/^[0-9a-zA-Z\^\&\'\@\{\}\[\]\,\$\=\!\-\#\(\)\.\%\+\~\_ ]+$/.test(folderName)) {
|
||||
alert('Invalid folder name. The following characters are not allowed: / : * ? " < > |');
|
||||
return;
|
||||
|
|
|
@ -176,7 +176,7 @@ class FileDialogContainer extends Component {
|
|||
const folderName = this.state.newFolderName;
|
||||
const directoryURI = this.state.selectedDirectory || this.state.tree.uri;
|
||||
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
if (!/^[0-9a-zA-Z\^\&\'\@\{\}\[\]\,\$\=\!\-\#\(\)\.\%\+\~\_ ]+$/.test(folderName)) {
|
||||
alert('Invalid folder name. The following characters are not allowed: / : * ? " < > |');
|
||||
return;
|
||||
|
@ -205,7 +205,7 @@ class FileDialogContainer extends Component {
|
|||
} else {
|
||||
let fileName = this.state.fileName;
|
||||
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
if (!/^[0-9a-zA-Z\^\&\'\@\{\}\[\]\,\$\=\!\-\#\(\)\.\%\+\~\_ ]+$/.test(fileName)) {
|
||||
alert('Invalid file name. The following characters are not allowed: / : * ? " < > |');
|
||||
return;
|
||||
|
|
|
@ -180,7 +180,7 @@ export default class History {
|
|||
cmd = this.redo();
|
||||
}
|
||||
} else {
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
cmd = this.undos[this.undos.length - 1]; // next cmd to pop
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ export async function loadSerializedScene(sceneDef, baseURL, addComponent, isRoo
|
|||
|
||||
if (inherits) {
|
||||
const inheritedSceneURL = new URL(inherits, baseURL);
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
scene = await loadScene(inheritedSceneURL.href, addComponent, false);
|
||||
|
||||
if (isRoot) {
|
||||
|
|
|
@ -29,7 +29,7 @@ async function getProjectHierarchy(projectPath) {
|
|||
const directoryEntries = await fs.readdir(filePath);
|
||||
|
||||
for (const childEntry of directoryEntries) {
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
if (/(^|\/)\.[^\/\.]/g.test(childEntry)) {
|
||||
continue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче